Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default file permissions

Status
Not open for further replies.

TonyGroves

Programmer
Aug 13, 2003
2,389
IE
I want to ensure that all files in users' home directories have their permissions set by default to 0660 (0770 for directories). If I put "umask 007" in .bashrc, that takes care of files created by Bash, and Samba seems to use those permissions by default, but what about other programs? Is there any way to ensure that all programs use those default permissions?

Thanks a lot.
 
Hi Tony, linux programs should stick to what you have set as umask. problems may arise when windoz networked boxes save or edit files on your samba shares.
if that is the case, I fixed my similar problem by adding something like

force create mode = 660

at the end of shares declarations in smb.conf.
I will check if it is the correct syntax and get back to you.

Cheers

QatQat


Life is what happens when you are making other plans.
 
Thanks.

Samba is not a problem; the required permissions are used by default, and I know about "force create mode" and "force directory mode".

However, even with "umode 007" in .bashrc, other programs don't use those permissions. For example, cups-pdf still uses 600, as does my mailbox-delivery script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top