Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ General Discussion _ User Sticky Bit

Posted by: dougadams Jun 9 2005, 07:37 PM

How do you set a user to always have files set to 755 when they create them.

Posted by: dnvikram Aug 13 2006, 05:58 AM

QUOTE (dougadams @ Jun 10 2005, 06:07 AM) *
How do you set a user to always have files set to 755 when they create them.


Hi Doug!

Unfortunately this is not possible by default in linux...If u observe,the default permission for a file woud be 644 and for a dir it wud be 755.This also depends on the umask value.which is by default set to 0022.U can check this with the command umask from the command line.

Maybe you can try writing a script which will act as a wrapper for the commands which are used to create files(ex:touch,cat>,vi).When,one of these are used to create a file,the script will immediately invoke the chmod <perm> and change the perm of the file..so it will sort of transparent...

Y dont u explore the possibility of achieving this thru ACL??Im not sure..u can try....

let me know incase of any progress in ur trials..

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)