Results 1 to 3 of 3

Thread: Set permissions on shared folder

  1. #1
    Join Date
    May 2021
    Beans
    1

    Post Set permissions on shared folder

    Good afternoon,

    i am trying to set a shared folder to be accessible via network for 2 users: teachers and students.

    Teachers to have full access and students read only.

    I set teachers as owner of the shared folder and changed the group they are in "teaching".

    When I access this shared folder from the teachers side it is only letting me to read. It does not allow copying files or delete. Then when I "Allow others to create and delete files in this folder" from the gui, it give full permission to both students and teachers and can copy and delete.

    I am new to the ubuntu enviroment so not sure what I am doing wrong.

    Can someone help?

    Regards

    Joseph

  2. #2
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    5,865
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Set permissions on shared folder

    Permissions for the group must be set to read and write (and execute for directories or executable files), permissions for others must be set to read (and execute for directories or executable files), but no write.

  3. #3
    Join Date
    Dec 2009
    Beans
    6,530

    Re: Set permissions on shared folder

    Then when I "Allow others to create and delete files in this folder" from the gui
    You created a samba usershare from Nautilus. You cannot do what you want using this method.
    I set teachers as owner of the shared folder and changed the group they are in "teaching".
    I would suggest undoing the nautilus share and create 2 shares of the same folder in /etc/samba/smb.conf itself. Something like this:

    Code:
    [Shared-Teachers]
    path=/path/to/shared/folder
    guest ok = no
    read only = No
    valid users = @teaching
    force user = teachers
    Code:
    [Shared-Students]
    path=/path/to/shared/folder
    guest ok = no
    read only = Yes
    Then restart smbd:
    Code:
    sudo service smbd restart
    The valid users = @teaching will prevent everyone other than members of that group from accessing the share. So one share is writeable to teachers the other read only to everyone else.
    Last edited by Morbius1; May 4th, 2021 at 01:11 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •