Help - Search - Members - Calendar
Full Version: Default Permissions For New Files?
Linuxhelp > Support > Technical Support
ahz
How do I set the default permission to be u=rw for /home/users and u=rw,g=rw for /home/shared?

I heard about umask, but that provides one default for all folders. Also I am not sure this works non-console app such as OpenOffice?

This will help ex-Windows users at the office.

Thank you.
hughesjr
OK ... for a users home directory, you can set the actual directory to permissions 700 (so only he can get in there)...so other users can't get in and it doesn't matter if the inside file or directory permissions are 755 or whatever.

For shared directories, I'm afraid that the only controls I know of are the user's individiual umask. A user will write all files as rw-rw-rw- (666) if the umask is 0000 ... file permissioins would be 644 if a users umask was 0022.

Eventually, there will be good ACL support in Linux...but not now.

You can control folder permission based on Group membership, but only one user and one group can own a file.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.