How to allow user other than root to write php script?
Hello friends,
As a root user I can write and run php scripts in /var/www/html but when I log-in as a user other than root, I am not allowed to write/update/create etc files. Please suggest some solution. Regards. |
The permissions on the /var/www/html directory determine who can create and
delete files in that directory. Any existing files have their own permissions. Plan who should have write access to these files, since they will be able to break your website or your server, whether accidentally or intentionally. |
Thank you cery much carltm.
So how can I give the create/change/delete etc permission mq15 (the user other than root)? [In fact I am myself the root user of my system but I log into fedora not as root user but as mq15 for security reasons. This was suggested by someone at this forum.] |
change the owner or change permissions for the directory /var/www/
|
Thanks mobinskariya but I don't know how to change permissions for /var/www/ directory...
|
its simple read manual.
Code:
man chown good luck |
Oh, that was a good way to make me learn myself...
So will Quote:
|
Quote:
Code:
chown -R user:group /var/www/ then change the permissions Code:
chmod -R u+rwx /var/www/ hope that helps |
Thanks
First: There are two users on my system:1.root and 2.mq15. So I don't know what will I have to substitute with group in this command: Quote:
|
even if you dont use group it wont affect..so you may use
Code:
chown -R user /var/www/ |
Thank you very much mobinskariya..and see I have not forgotten clicking the blue thumbs up icon..
|
All times are GMT -5. The time now is 04:17 PM. |