Linux - NewbieThis 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.
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.
ok heres my problem . I am a total *nix noob and as expected the concept of permissions became a nightmare for me. My problem , to be more specific is that I am using Apache running on perl and I need to chmod some directories to 777 in a certain perl script while creating those directories because otherwise the directories dont get created by Apache ( apache logs in as "apache" ) Ok guys i know 777 mode is a security hole, Read around and found that suexec wud be a solution , but it looks like a roundabout way and moreover the whole damn thing sounded too confusing for me.I Know there has to be an easier method than that , so please help u apache and linux geniuses
chmod 777 is not always the best way to go about things. First, who is apache run by? User 'nobody'? If so, allow user nobody to have 'w'rite permissions on the directories. That should solve your problem. To do this, man chmod and man chown.
Originally posted by twantrd chmod 777 is not always the best way to go about things. First, who is apache run by? User 'nobody'? If so, allow user nobody to have 'w'rite permissions on the directories. That should solve your problem. To do this, man chmod and man chown.
-twantrd
apace doesnt run as nobody it runs as 'apache' thats the problem. btw can chmod and chown be executed by apache as system commands when running scripts ? btw these directories are created in a perl script at runtime
Last edited by the_last_rites; 01-17-2005 at 11:25 PM.
apace doesnt run as nobody it runs as 'apache' thats the problem
Ok, it's not run by user 'nobody' but 'apache'. Allow the user apache to be able to write to those directories. In fact, just make the directories writeable by group 'apache'. The concept is the same. If a process is ran by a different user, you just have to set permissions accordingly for that user.
Code:
btw can chmod and chown be executed by apache as system commands when running scripts
I'm not a perl guru (well, not yet hehe) but I've used system differently. But if that syntax is correct, then yes, it should work. If it doesn't, paste what the error is here so I can help you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.