2 added 59 characters in body
source | link

User Directory Permissions ?

Solution:

Let's assume that you have this directory:

/home/office/files

Of course you would wanted only Staff to have access to it.

On your *nix box, you've created staffstaff as group, and assigned staff to staffstaff group.

To know which group a user belong to, you don't need to expose your /etc/passwd file, just issue this command:

root@Hosts:~# id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data),2001(ftpgroup)

id usernameid username, gives information about the user in question or finger username givegives more information as well about a user such as login name, directory etc.

However, the following commands ensure that any user not in staff group will not have access to /home/office/files

chown -R myuser:staff /home/office
chmod 750 /home/office

Replace myuser with username to have access and staff with groupname to have access to the folder.

NJOY

Solution:

Let's assume that you have this directory:

/home/office/files

Of course you would wanted only Staff to have access to it.

On your *nix box, you've created staff as group, and assigned staff to staff group.

To know which group a user belong to, you don't need to expose your /etc/passwd file, just issue this command:

root@Hosts:~# id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data),2001(ftpgroup)

id username, gives information about the user in question or finger username give more information as well about a user such as login name, directory etc.

However, the following commands ensure that any user not in staff group will not have access to /home/office/files

chown -R myuser:staff /home/office
chmod 750 /home/office

Replace myuser with username to have access and staff with groupname to have access to the folder.

NJOY

User Directory Permissions ?

Solution:

Let's assume that you have this directory:

/home/office/files

Of course you would wanted only Staff to have access to it.

On your *nix box, you've created staff as group, and assigned staff to staff group.

To know which group a user belong to, you don't need to expose your /etc/passwd file, just issue this command:

root@Hosts:~# id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data),2001(ftpgroup)

id username, gives information about the user in question or finger username gives more information about a user such as login name, directory etc.

However, the following commands ensure that any user not in staff group will not have access to /home/office/files

chown -R myuser:staff /home/office
chmod 750 /home/office

Replace myuser with username to have access and staff with groupname to have access to the folder.

NJOY

1
source | link

Solution:

Let's assume that you have this directory:

/home/office/files

Of course you would wanted only Staff to have access to it.

On your *nix box, you've created staff as group, and assigned staff to staff group.

To know which group a user belong to, you don't need to expose your /etc/passwd file, just issue this command:

root@Hosts:~# id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data),2001(ftpgroup)

id username, gives information about the user in question or finger username give more information as well about a user such as login name, directory etc.

However, the following commands ensure that any user not in staff group will not have access to /home/office/files

chown -R myuser:staff /home/office
chmod 750 /home/office

Replace myuser with username to have access and staff with groupname to have access to the folder.

NJOY