LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-23-2009, 11:28 AM   #1
rhel5
Member
 
Registered: Mar 2009
Location: Bay Area, CA
Distribution: Redhat Enterprise Linux
Posts: 59

Rep: Reputation: 15
Using 777 default permissions for Files?


Is there any way to use 777 default file permissions in RHEL4 update 5?

I know that 777 default pemissions are for folders and 666 default permissions are for files.

But I need to set umask of 000 to yield 777 permissions for files. We have several contractor accounts which has their own private user groups. Data must be fed to them in order for them to work, so their home directory is 777. We also need to have the contractors' files created as 777 so that our employees can modify and execute them as scripts.

I believe I can use ACL to get around this problem, but we our using NFS v3 to export the home directory. NFS v3 does not support ACL.

Is there a configuration file that I can modify on /etc to get around this?

Thanks much!
 
Old 04-24-2009, 07:13 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
You may want to consider a different approach: generally, the default umask setting is (and should be) 022; i.e., files are read-write for the owner, read for the group and read for public. You can change that value to 002 so that files are read-write for both owner and group. Having directories and files created with the modes you're suggesting is, well, just asking for trouble -- bear in mind that if umask is set system-wide to create files and directories as you're thinking, every file and directory will be created that way irrespective of "who" creates them (so, anything created by root will have Attila the Hun privileges for anybody with access to the system). A umask value of 022 creates directories "755" and files with "644," and a umask value of 002 creates directories "775" and "664" which is more reasonable.

If you set your umask to 002 and your contract employees are in group "contractor" they will have permissions to read and write files as necessary; adding your regular employees to the "contractor" group (you would use the usermod utility, possibly with the -G option) and add your regular employee's user names to the "contractor" group so they would have read-write permissions. If you look at the file /etc/group you will see examples of what this would look like. Note that you do not change the regular employee's default group (which may be "users"), rather you add their account names to the "contractor" group (in /etc/group with the usermod utility) so that they can access files and directories.

There may be a file /etc/login.defs on your system; if so, that is where you can change the UMASK value from 022 to 002. Please do not change that to 000 -- it will come back an bite you if you do.

Hope this helps some.
 
Old 04-24-2009, 09:58 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by rhel5 View Post
Is there any way to use 777 default file permissions in RHEL4 update 5?

I know that 777 default pemissions are for folders and 666 default permissions are for files.

But I need to set umask of 000 to yield 777 permissions for files. We have several contractor accounts which has their own private user groups. Data must be fed to them in order for them to work, so their home directory is 777. We also need to have the contractors' files created as 777 so that our employees can modify and execute them as scripts.

I believe I can use ACL to get around this problem, but we our using NFS v3 to export the home directory. NFS v3 does not support ACL.

Is there a configuration file that I can modify on /etc to get around this?

Thanks much!
Usually allowing more than one user modify file is asking for trouble.
And usually when some kind of version control can be used instead
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set folder permissions to allow 777 for all files s0n|k Linux - Newbie 3 11-08-2006 09:26 AM
Set default permissions for new files and folders jmkelm08 Linux - General 1 09-11-2006 08:26 PM
apache2 + chmod 777 pipe permissions = ? mpapet Linux - Security 3 06-27-2006 07:40 PM
Default permissions of files and folder maginotjr Slackware 2 07-29-2005 03:52 AM
default files and folder acl permissions Baltasar Fedora 4 08-30-2004 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration