Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-01-2002, 10:50 AM
|
#1
|
LQ Newbie
Registered: Jul 2002
Posts: 1
Rep:
|
file perm, chgrp, chmod, and umask
I have a web server where I want multiple users to be able to maintain, modify, and create files in the /home/httpd/html dir.
I have made the users members of a new group (web).
I have chgrp -R the dir so that all current files and sub dirs are owned by the web group.
I want the users to show up as the owner (for tracking purposes) and the group to be web on all NEW files and dirs.
Currently they show up as the user for owner, but USER for the group.
I set the GID bit with chmod and now new files do show up as web for the group. Is that the correct way?
2nd question:
Is there any way to set a default umask for a part of the dir structure? Currently the umask is 077 and that means that I have to go in and chmod all the web files so they work on the site. I DO NOT want these users to have to do that.
I could set the default umask to 775, but then ALL files will be created that way.... not good.
Surely there is a way to accomplish this.
Martini
|
|
|
08-06-2002, 11:10 AM
|
#2
|
Member
Registered: Apr 2002
Location: Bronx, NY
Distribution: Ubuntu
Posts: 371
Rep:
|
1) Yes, that is the right way.
2) I believe most admins use a script that runs from CRON on a nightly or hourly basis.
++ script ++
chgrp -R web /home/httpd/html
chmod -R a+r,ug+w,o-w /home/httpd/html
++ end ++
|
|
|
08-06-2002, 08:04 PM
|
#3
|
LQ Addict
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704
Rep:
|
Regarding point 2: don't try it on old systems (potentially with old fileutils) if a malicious user in the web group creates a symlink to a file, for instance /etc/passwd when this scriipt is running out of cron /etc/passwd file ends up to be in the hands of this user.
Last edited by neo77777; 08-06-2002 at 08:09 PM.
|
|
|
All times are GMT -5. The time now is 06:37 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|