Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Get effective file attributes with IFileStore
Get effective file attributes with IFileStore [message #310137] Wed, 22 November 2006 14:46
Eclipse UserFriend
Originally posted by: daniel4321.terra.com.br

--=-CBsko1YE5YYvDtwppBLM
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

I was using !
IFileStore.fetchInfo().getAttribute(EFS.ATTRIBUTE_READ_ONLY) to check if
a directory is writeable.
I noticed that this check return true if the owner of the file has +w
permissions, but not if the user has effective permissions.

For example, suppose a directory owned by root and that has write
permissions only for root. A user, eg daniel, will call
IFileStore.fetchInfo().getAttribute(EFS.ATTRIBUTE_READ_ONLY) and return
false, meaning that it is possible to write to the directory. But
actually, daniel has not permission to write the directory only root.

Did someone also have this problem?

Best regards,
Daniel F

--=-CBsko1YE5YYvDtwppBLM
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.10.3">
</HEAD>
<BODY>
Hi,<BR>
<BR>
I was using ! IFileStore.fetchInfo().getAttribute(EFS.ATTRIBUTE_READ_ONLY) to check if a directory is writeable.<BR>
I noticed that this check return true if the owner of the file has +w permissions, but not if the user has effective permissions.<BR>
<BR>
For example, suppose a directory owned by root and that has write permissions only for root. A user, eg daniel, will call IFileStore.fetchInfo().getAttribute(EFS.ATTRIBUTE_READ_ONLY) and return false, meaning that it is possible to write to the directory. But actually, daniel has not permission to write the directory only root.<BR>
<BR>
Did someone also have this problem?<BR>
<BR>
Best regards,<BR>
Daniel F
</BODY>
</HTML>

--=-CBsko1YE5YYvDtwppBLM--
Previous Topic:Tabbed property sheet question
Next Topic:Open the select file window
Goto Forum:
  


Current Time: Fri May 09 23:52:22 EDT 2025

Powered by FUDForum. Page generated in 0.02578 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top