0

I'm able to write changes in the home directory, but when it comes to the /var/www/html folder, it's not allowing me to make any changes or create new files or folders. I can view the folders and files as well.

I have tried to add my username to the group that it belongs to, but I get the message that I don't even have the correct permissions to change that inside the terminal. Please suggest what I should do to correct this. Thanks.

This is inside Whonix if that helps.

  • You may need to logout and back in... or type $ newgrp <group you added yourself to> – Daniel Toebe Apr 13 '16 at 16:20
0

Let me show my current setting, that may help you to to give correct permission and group owner to files and directory.

This my current chown and chmod for /var/www/

$ ls -l /var/www/
drwxr-xr-x. 2 root root 4096 Jan  4 16:25 cgi-bin
drwxr-xr-x. 8 root root 4096 Mar  4 08:54 html

And for inside /html/

$ ls -l /var/www/html/
drwxr-xr-x.  3 rob rob 4096 Nov  4 11:41 adminer
drwxr-xr-x.  8 rob rob 4096 Oct  5  2015 DVWA-1.9
drwxr-xr-x. 11 rob rob 4096 Dec 10 14:24 eDokumen

I alway use this recursive command. PHP files are run under the user of the website instead of the Apache user and globally reset all files (user,group,file and directory):

$ sudo chown -R user:group *
$ sudo find . -type f -exec chmod 644 {} \;
$ sudo find . -type d -exec chmod 755 {} \;

* Note : Replace the user and group label with you own setting

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.