Ubuntu Writable Folder Files-Problem to Modify Any File User Group Add

0
77

If you make /var/www writeable by its group and add the user to the group, that user will not have to use sudo. Try this:

The user should then be able to edit /var/www/ files without hassle.

Then make a group to which a user may belong for this purpose.

The user needs to log out and in again to become a member of the developers group.

Of course, do not do this if you have content in the /var/www directory that you want, but just to illustrate setting it up to start:

Look Terminal like –

sarker@ggadmin-Latitude-E5450 : /var/www/html/laravel/app : vim User.php

add my user to www-data group with:

and then I just add a symlink for www to my users home folder with:

add my user to www-data group with:

and then I just add a symlink for www to my users home folder with:

Now when I sftp into my users home-folder, I can just click through to www and I have enough permissions to edit files and such. If I create new files, I have to remember to run:

Doing that sets the new files to be owned by www-data. Everything works and the internet is happy.

I have been thinking of trying something a little different. What if I set www-data as the default group for sarker.

And then set adam as the owner of /var/www and www-data as the group