[ee122] file permissions and file handling
Davide Cerri
davide.cerri at gmail.com
Sat Oct 27 13:30:50 PDT 2007
Hello,
I thought to use stat to check for the file information, but the man page show
#define S_IFMT 0170000 /* type of file */
#define S_IFIFO 0010000 /* named pipe (fifo) */
#define S_IFCHR 0020000 /* character special */
#define S_IFDIR 0040000 /* directory */
#define S_IFBLK 0060000 /* block special */
#define S_IFREG 0100000 /* regular */
#define S_IFLNK 0120000 /* symbolic link */
#define S_IFSOCK 0140000 /* socket */
#define S_IFWHT 0160000 /* whiteout */
#define S_ISUID 0004000 /* set user id on execution */
#define S_ISGID 0002000 /* set group id on execution */
#define S_ISVTX 0001000 /* save swapped text even after use */
#define S_IRUSR 0000400 /* read permission, owner */
#define S_IWUSR 0000200 /* write permission, owner */
#define S_IXUSR 0000100 /* execute/search permission, owner */
How can we check for world access?
I am assuming that we are allowed to send only world readable files to
the clients.
Also? the specs says that we only look for files starting from the web
server directory?
any hint on how to handle that? should we calculate that by parsing
the path and checking for ../ occurrences?
thanks,
--
~/Davide Cerri
More information about the ee122
mailing list