Question

I just installed lamp-server^ on my home linux machine. Now I created a new folder project with files in the /var/www/ directory (server root directory). I set the owner user/group to www-data via sudo.

Now I want to access the folder and its files via cd or normally via the file explorer, but I get the error that I haven't the permission to do/access that folder or its files (with my normal user account).

Is it possible to give my user account the rights to access/modify the project folder?

Was it helpful?

Solution

you can either

a+rwx the directory or

include yourself in that group, but from your question, it seems you don't want to do that. it would be more secure than allowing anyone to read, write and execute that dir.

OTHER TIPS

Yes it is possible. Just add your user in www-data group.

useradd -G www-data {your_username}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top