Ubuntu Folder and File sharing

I need to set up wwwroot folder so that It can have access to the users.

The permission should be set on the following basis:

1. The wwwroot directory in /www
2. When the any user1 create a folder lets say /wwwroot/myproject, that particular user need to have full access to /wwwroot/myproject.

3. However when user2 create a folder lets say /wwwroot/myworld, he also need to have fill access to /wwwroot/myworld but view access to  /wwwroot/myproject.

4. Finally /wwwroot directory should appear in all users home
Who is Participating?

Make a symbolic link from each users home dir to wwwroot:

$ cd ~
$ ln -s /var/www www

Set group owner to 'user' and give R+W rights to the group:

$ cd /var
$ sudo chgrp -R user www
$ sudo chmod -R g+rw www

If you do a 'ls -l' you can see the file and directory permissions.

The first column shows the file type (first character) and the access rights (next 9 characters). First 3 characters are user access rights, named u after user, next 3 are the group access rights named g after group, and the last 3, other access rights, are marked as o after others.

Regards, Tobias
I would look into ISPConfig or something similar for your needs.

It sound like you will still need to specify a group that has read access to the wwwroot dir and all users will be a member of that group.
Method 1:
open a terminal window, type in "sudo nautilus". browse to "/". right click the wwwroot folder and set the permissions so that everyone can access the folder.

method 2:
open terminal window, type in "sudo chmod 0777 -R /wwwroot"
I used /var/www as an example. If you have your wwwroot in /www you have to change the commands according to this.

I've attached a pic of the resulting file rights when a user creates a file + how the www-link looks like in the users home dir.

Regards, Tobias
oh, I almost forgot, the users have to be members of the group 'user' for this to work.

Regards, Tobias
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.