Reputation: 3424
i cant seem to make a folder using exec('mkdir new')
through php using the www-data account...I have done chmod 775 /var/www
however i still don't have privileges.
Although the foldering is being created, i get the following error
The new folder is actually being created....but the error is still popping up...
mkdir: cannot create directory `hello': File exists
I have set the owner of /var/www
to www-data
, yet the error still persists.
Upvotes: 0
Views: 453
Reputation: 1420
You're creating the same directory multiple times. Each time you create it you must delete it before you create it again. Three solutions:
rm -rf hello
Upvotes: 0
Reputation: 31182
The problem is that there is a file or directory with such name already. See the error message:
mkdir: cannot create directory `hello': File exists
Try this:
cd /tmp
mkdir new_file
mkdir new_file
You will get the same error. It's not a permission problem. You cannot have two object with the same name in one directory.
Upvotes: 1