Ubuntu – Change file permission from -rwxrwxr-x to drwxrwxr-x

apache-2.2permissionsUbuntu

I have a php file which is trying to read and write xml files on my Ubuntu server, however the problem is that it does not have permission to do this (permission denied error).

I have tried the following chown www-data read_write.php with no luck

What is the proper way to change permission for this file?

more info

-rwxrwxr-x 1 www-data www-data 14092 Sep 6 12:33 read_write.php

Best Answer

Maybe you are a little confused...

The "d" character in front of your string means only that this is a directory, not a file. You should look at your XML's permissions instead!