Web Server/Permissions issues.

I do not know if this is the correct place to post this, and I have tried to trawl through relevant articles to fix the issue, but I am stumped.

I have a server, log as root.

var/www is root:root

var/www/website-one is root:root

var/www/website-one/neosmart-stream is root:root

This error pops up

It is not possible to create new directories via PHP mkdir(). /var/www/website-one/neosmart-stream/ (CHMOD 0775) is not writeable.
Try to set your webserver as owner of /var/www/website-one/neosmart-stream/

Has this web server been setup incorrectly ?

On another web server not managed by me the permissions/group are right and everything works fine ?

Can anyone direct me on the right path please ?

The issues is, more than likely, is that your web server (after it starts up) does not run as the root user. That is why you are having a permission problem (more-than-likely).

1 Like

As part of your error message says:

As Neo has already post, your web server (process) does not have the required access rights to the files in question. This is typically fixed by changing the owner of the whole tree to the webserver user (eg, on Solaris x86 this is "webservd"). Or your web server may be running under userid "apache" for example.

To help you more we need to know the environment (O/S, webserver, etc) but you'll be pleased to know that your issue is not unusual at all when installing a web server. It happens all the time upon initial install.

1 Like

ubuntu-9.04-server-i386 ? Should this not be the latest version ?

I got somewhere earlier, with chown & chgrp, but there is a issue with -R seems to prevent me from using this as well.

var/www/website-one/neosmart-stream/ works but neosmart-stream/nss-admin ect do not work even when giving it a UID of 33 ?

Trying to learn what I can off the net now, but this server does seem to be setup incorrectly as you stated ?

Your post above is not very helpful.

First of all, do you know exactly what user and group your web server is running?

Do you know how to determine that basic information?

root:root is running the webserver ?

How do I determine that ?

I was given the root as username and the password.

It's extremely unlikely that the user "root" is running the webserver.

Login to the system as root and look at all the running processes:

ps -eaf|more

Look for a process that looks like the web server process (eg. apache or similar known web server).

If you can find the process then the user running it (see column 1) is the user that doesn't have access to the files in the www default directory tree.

If you can't find the web server process, post the whole output of:

ps -eaf

so that we can have a go.

---------- Post updated at 08:52 PM ---------- Previous update was at 08:51 PM ----------

And also, if you're logged in as "root" (ie, god) you shouldn't have any trouble running 'chown -R'

1 Like

It gives me a invalid command for ps -eaf|more

So I should get more information as to who runs this ? I was told it was a dedicated server and the owner "has free reign" ?

I can individually change each directory/file but not -R which does not make sense.

What should I be asking the owner, he is very sparse on information.

Linux Apache/2.2.11 Ubuntu PHP/5.2.6-3ubuntu4.6 with Suhosin-Patch

Thank you for your time.

So what does

 
 ps
 

do? Still invalid command? (Perhaps Ubuntu doesn't like the switches we used).

Try

 
 chown -r <new owner> <file(s)/tree>
 

perhaps it doesn't like the -R

It does not like that either... I see Webmin is installed on the server but get anything run is proving futile. Whoever manages the server now, says I do have superuser access... but not even sudo is working.

Im connecting via sftp.

Do you advise upgrading the webserver ? Or must I get in contact with the current admin ?

Can you suggest any reading material ? So I can educate myself with the basics and have a solid foundation.

Thank you for your time.

can you sudo with your username? u need root access to have full control