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.
i've just setup my first Linux server and installed apache + php. I have a simple PHP script which should just create ja directory. But i always get the following error:
PHP Warning: mkdir() [function.mkdir]: Permission denied in /var/www/html/default/test.php on line 3
So as you can see the script is within the folder 'default' which has rights set so 777
Code:
ls -rtl
drwxrwxrwx 2 apache apache 4096 2009-11-23 19:38 default
i'm not sure but i don't think so. It's a VPS with a basic fc10 install. Can i check that somehow?
//edit: I've just run the script as root via the local php interpreter and then everything works fine. Anybody has a clue why it fails when i try it within the webserver?
PHP safe mode is on?
this just looks extremely stupid to me: it must work under even 0700 with user "apache". copy your phpinfo() outputs.
--
upd: try to su to "apache" and cd to that directory then mkdir test there.
Last edited by Web31337; 11-24-2009 at 10:54 AM.
Reason: su
PHP safe mode is on?
this just looks extremely stupid to me: it must work under even 0700 with user "apache". copy your phpinfo() outputs.
--
upd: try to su to "apache" and cd to that directory then mkdir test there.
i can't su to apache...
Code:
su apache
This account is currently not available.
If you look at the info in /etc/passwd (if you need to modify don't do it directly, use a program or at least vipw) you will see that the user apache may not have a shell, a home and/or a password which will prevent it from being used as a regular user. You could try to edit in a shell and use the passwd command to give a password and then try what Web suggested (back up your /etc/passwd and /etc/shadow files and restore them after you're done this test).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.