View Single Post
Old 08-29-2010, 02:57 AM  
Yil
Too much time...
 
Join Date: May 2005
Posts: 1,194
Default

Hmm... [vfs read] actually does return "uid gid mode" with the last 3 digits being the octal mode of the permissions. However, at some point in the past I started using higher order bits to reduce attribute lookups if the chattr value was known to not exist. I hemmed and hawed a bit and decided to let [resolve list], [vfs dir], and [vfs read] return the extra bits so that scripts could benefit as well. If the bit is set the value exists and you know it's a symlink, hidden dir, etc and if not set then you know it isn't. Saves having to do a [vfs chattr 1] to test for symlinks all the time. I updated the [resolve list] documentation but failed to do so for the [vfs] commands so that's why it's not making sense to you... Just OR the bits with 0777 to get just the permissions like before. The higher order bits are:

#define S_REDIRECTED 040000 // not currently used...
#define S_SYMBOLIC 020000 // ioFTPD symbolic link (chattr 1)
#define S_PRIVATE 010000 // Private/hidden dir (chattr 0)
Yil is offline   Reply With Quote