Set up permissions for a secondary user

dreadiscool

I have a user that I want to give read and write access to a folder in my root home (/root/test)

Is there a way to give them permission to only modify files in /root/test, but not /root itself?

Also, this is kind of a side question, but how can I prevent this user from being able to view or edit the files in /var/www? There are some PHP files in there which contain sensitive information. I have already tried chmod -R o-r /var/www but that prevented the webserver itself from working.

Thanks in advance!

Radu Rădeanu

You can use setfacl:

sudo setfacl -R -m u:username:rwx /root/test

See man setfacl and Prevent user from viewing and editing /var/www folders for more about.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to set up user roles and permissions?

From Dev

Setting Up User Permissions

From Dev

Set permissions based on user permissions

From Dev

(Secondary) "Set up OneDrive" popup keeps appearing

From Dev

Set up a user for a program

From Java

How to set up file permissions for Laravel?

From Dev

How to set up wireshark with correct permissions

From Dev

NTFS permissions set up in GPM overwrites currect permissions

From Dev

Set user permissions for specific views in Django

From Dev

Unable to set user permissions correctly in rails

From Dev

How to set the permissions for SFTP user in redhat linux?

From Dev

How to set user permissions on ubuntu server

From Dev

Laravel Set up User Language

From Dev

Set up minimal user rights

From Dev

Set up a user with specific properties

From Dev

Laravel Set up User Language

From Dev

How do I set up permissions in django-rest-framework so that the session user can only list objects which have a foreign key to that user?

From Dev

How do I set up permissions in django-rest-framework so that the session user can only list objects which have a foreign key to that user?

From Dev

Windows 8 messed up my Windows 7 user folder permissions

From Dev

When I set up Hadoop, what permissions are needed on the *underlying* filesystem?

From Dev

Cannot clone with Git though all permissions have been set up

From Dev

how to set up permissions in neo4j?

From Dev

Do application installers set folder permissions? Or is it up to Windows?

From Dev

How to set up users, ownership and permissions across local and remote servers?

From Dev

how to set up permissions in neo4j?

From Dev

Set up NTFS security permissions to allow modify for subfolders/files but not parent

From Dev

User permissions

From Java

Kubernetes: how to set VolumeMount user group and file permissions

From Dev

How to fix postfix set-permissions without user named root?

Related Related

  1. 1

    How to set up user roles and permissions?

  2. 2

    Setting Up User Permissions

  3. 3

    Set permissions based on user permissions

  4. 4

    (Secondary) "Set up OneDrive" popup keeps appearing

  5. 5

    Set up a user for a program

  6. 6

    How to set up file permissions for Laravel?

  7. 7

    How to set up wireshark with correct permissions

  8. 8

    NTFS permissions set up in GPM overwrites currect permissions

  9. 9

    Set user permissions for specific views in Django

  10. 10

    Unable to set user permissions correctly in rails

  11. 11

    How to set the permissions for SFTP user in redhat linux?

  12. 12

    How to set user permissions on ubuntu server

  13. 13

    Laravel Set up User Language

  14. 14

    Set up minimal user rights

  15. 15

    Set up a user with specific properties

  16. 16

    Laravel Set up User Language

  17. 17

    How do I set up permissions in django-rest-framework so that the session user can only list objects which have a foreign key to that user?

  18. 18

    How do I set up permissions in django-rest-framework so that the session user can only list objects which have a foreign key to that user?

  19. 19

    Windows 8 messed up my Windows 7 user folder permissions

  20. 20

    When I set up Hadoop, what permissions are needed on the *underlying* filesystem?

  21. 21

    Cannot clone with Git though all permissions have been set up

  22. 22

    how to set up permissions in neo4j?

  23. 23

    Do application installers set folder permissions? Or is it up to Windows?

  24. 24

    How to set up users, ownership and permissions across local and remote servers?

  25. 25

    how to set up permissions in neo4j?

  26. 26

    Set up NTFS security permissions to allow modify for subfolders/files but not parent

  27. 27

    User permissions

  28. 28

    Kubernetes: how to set VolumeMount user group and file permissions

  29. 29

    How to fix postfix set-permissions without user named root?

HotTag

Archive