Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Folder permissions problem

  • 24-04-2010 7:19pm
    #1
    Moderators, Education Moderators, Technology & Internet Moderators Posts: 35,125 Mod ✭✭✭✭


    I have a file server here that is running xubuntu and I'm using samba to share it out over the network to all the pcs in the house. On the samba share I have allowed the guest account to read all the shares (disabled write access because I don't want my housemate accidentally deleting something). The problem is a lot of the folders don't have read permissions for the guest account. So the my friend tries to access the folder and he gets a big access denied thrown in his face. Is there any way to change all the current folders and make all future folders created to have read only access for guest.


Comments

  • Registered Users, Registered Users 2 Posts: 218 ✭✭Tillotson


    Samba can only add to existing permissions. You'll have to change the permissions of the actual files or add your friend to the relevant groups then something like this in your smb.conf should work:

    [Media]
    comment = Samba Share
    path = /srv/samba/media
    valid users = @smbusers
    write list = AlmightyC
    guest ok = no
    browseable = yes
    create mask = 0640
    directory mask = 0750

    I find it handiest to change my primary group to "users" and then any file I create will automatically be of that group.


  • Moderators, Education Moderators, Technology & Internet Moderators Posts: 35,125 Mod ✭✭✭✭AlmightyCushion


    I got part of the issue sorted. It turns out the program I use for downloading was setting permissions up weird for the folders and files it created. It's doing it the right way now. So all folder and files it creates are readable by the guest account. Now I just got to fix all the folders/files it didn't set the permissions correctly for.


  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    Maybe try changing the ones that need fixing manually?
    chmod -R 744 <broken file>
    

    The -R option just means recursive which should work for all files under a directory, along with single broken files. Your owner should have full
    access, and group read, and everybody else will also have just read access. Make sure you only run the command in the directory where your
    required files are. Hope this works out for ya.


  • Moderators, Education Moderators, Technology & Internet Moderators Posts: 35,125 Mod ✭✭✭✭AlmightyCushion


    Naikon wrote: »
    Maybe try changing the ones that need fixing manually?
    chmod -R 744 <broken file>
    

    The -R option just means recursive which should work for all files under a directory, along with single broken files. Your owner should have full
    access, and group read, and everybody else will also have just read access. Make sure you only run the command in the directory where your
    required files are. Hope this works out for ya.

    Worked a treat. I was looking at chmod all right but I couldn't make head nor tails of the information on the site I was looking at. I'll chalk it down to late night and lack of tea. :) Cheers man.


Advertisement