- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to automaticaly chmod
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
Forums
Discussions
Discussions
Discussions
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
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
06-21-2005 06:20 PM
06-21-2005 06:20 PM
In HPUX the XY user is owner of the file program.c .
The XY user is in PRO group .
Other users of the PRO group don't have any permmission to this file (- r w - - - - - - - XY PRO program.c) .
The quetion is : Is it possible that when the owner creates a new file program.c (with vi, or by copying it, etc) or compiling a source program program.c and obtaining an executable file program.out ,
to be accessed in r w x mode (- r w - r w - - - - XY PRO program.c) (- r w x r w x - - - XY PRO program.out)
by the PRO group members ? HOW ?
Please be so kind and describe in details all the modalities you know.
Thank you very mutch.
Best regards.
Roxana
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2005 06:31 PM
06-21-2005 06:31 PM
Re: how to automaticaly chmod
Change umask 006
touch test.c
ls -l test.c
rw- rw- --- ...
Put this change in /etc/profile or $HOME/.profile file.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2005 06:56 PM
06-21-2005 06:56 PM
Re: how to automaticaly chmod
Regards,
Sergejs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2005 07:13 PM
06-21-2005 07:13 PM
SolutionBasis is that files are created with 666 mode. To this mod is substracted umask.
Umask 002, files are created with 664
Umask 027, files are created with 640
...
umask 027 is a good choice for what you want.
For more information use "man umask" and search about information on chmods.
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2005 08:01 PM
06-21-2005 08:01 PM
Re: how to automaticaly chmod
set default policy to $DIRNAME for future
create files, will automatic obtain the r-x
permission.
# setacl -m default:group:PRO:r-x $DIRNAME
use following to remove acl
# setacl -d group:PRO $DIRNAME
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2005 01:56 AM
06-22-2005 01:56 AM
Re: how to automaticaly chmod
The all other replies significant.
Especially using umask consept or automatically from the .profile but if you
decide to run it from crontab i advise you
to take a little bit care because 3 weeks
ago i have done for "chmod" to a nfs directory from
one of box to another and put it cron and
when urgent reboots needed so my cron can not
able to find&chmod nfs dir and this time chmod 777 run from /
:-))
so i have spent some time to fix it up
Good Luck,
Grts from Turkey,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2005 07:09 PM
06-22-2005 07:09 PM
Re: how to automaticaly chmod
You could also play on directories, 770-ing them so that users can COPY-AND-MODIFY-THEIR-COPY source files.
Good memories of your town, Marco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2005 07:35 PM
06-22-2005 07:35 PM
Re: how to automaticaly chmod
There are 2 problems here: one is creating a file with vi or cp, the other is generating an executable.
The first problem can be solved with the suggestions of the others whith the umask technique. The other problem can be solved by writing a wrapper script for compiling your C-program. The last thing this script does, is chmod g+rx program.out ( w is not necessary for running compiled programs ).
Greetings,
Philippe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 01:52 AM
06-29-2005 01:52 AM