- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Default file permission required 777
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 06:17 PM
тАО03-02-2006 06:17 PM
I need to copy lots of files in the home directory of a user everyday & execute it in a automated process. But every time i need to change the file permisson to 777 manually & then do it. If i change the umask 000 then file perm i am getting 666 & dir 777.
But is there any was so that i can get the default file perm 777 at the time of creation for a particular user. PLS HELP
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 06:21 PM
тАО03-02-2006 06:21 PM
Re: Default file permission required 777
You can specify "umask" in that particular user's profile in $HOME/.profile.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 06:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 06:36 PM
тАО03-02-2006 06:36 PM
Re: Default file permission required 777
Consider the architecture of unix it makes
no sense to have 777.
Not just a matter of compromising security,
but it is taking the easiest way out, while
with a bit of thought I am sure you won't need the default 777. (Hence it is not so readily possible)
We use
http://www.courtesan.com/sudo/
for these cases in our scripts,
so we do not compromise security and it
is very easy to configure.
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 06:52 PM
тАО03-02-2006 06:52 PM
Re: Default file permission required 777
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 07:38 PM
тАО03-02-2006 07:38 PM
Re: Default file permission required 777
Thats the way the hpux commands were built, all the file creating commands, let it be touch,cat,vi ...all were built to invoke chmod() system call with 666 permission max which are controled by "umask" option externally by OS. This is indeed safe. If you were under the impression, that cc create's a.out with default executable permission ,why not others, thats because , cc invokes system call chmod() explicitly to set execute permission on a.out.
There can be 2 way out for a solution.
1) U may reconsider the way permissions are alotted,777 is very unsafe. Even with the minimal but very effective security control given by unix that is, UGO and RWX, you will still be able to control access without giving 777.
2) U can try using "chmod -R" option instead of setting on each file, or write a script to do so.
regards,
Senthil Kumar .A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 08:07 PM
тАО03-02-2006 08:07 PM
Re: Default file permission required 777
try to modify the script that forms part of the automated process to do a chmod 777 on the files in the home directory.
hope this helps
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 08:15 PM
тАО03-02-2006 08:15 PM
Re: Default file permission required 777
a copy would preserve the permissions.
If you copy x.sh to a.sh, on which you have set 777 once, a.sh will still have 777, but the code is from x.sh.
I would create a number of files in the users directory, chmod them and then just copy your new files into the existing files.
Or can you please gives us more details on your automated system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2006 01:02 AM
тАО03-03-2006 01:02 AM
Re: Default file permission required 777
Usually when I see 666 and 777 files, it is because someone got a "permission denied" error message and an untrained system administrator tries to patch the problem with chmod 777. Since you say that you are copying files into a specific user's HOME directory, the solution is quite simple: copy the files into the user's directory and then change the ownership of those files to that user. Since this is automated, the extra step in changing the ownership is just another line in the script. And if these files are important, be sure to use umask 022 (which allows others to read the files) in your script.
I can't emphasize enough how unsafe 666 and 777 permission are, especially on a production machine. Those permissions mean that the contents can NEVER be trusted to be accurate.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2006 08:55 PM
тАО03-05-2006 08:55 PM
Re: Default file permission required 777
I couldn't put it in better words myself :)