Newbie Permissions Problems. Help me guys
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.
-twantrd |
Quote:
|
Code:
apace doesnt run as nobody it runs as 'apache' thats the problem Code:
btw can chmod and chown be executed by apache as system commands when running scripts -twantrd |
thanx mate ur a lifesaver. on a final note so ur telling me this shud work fine
Code:
system mkdir ".$file_folder", 0777 or die "Can't make dir: $!"; |
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.
-twantrd |
All times are GMT -5. The time now is 06:02 AM. |