Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: Samba. Cannot delete files on network share, yet 777 rights were granted.

  1. #1
    Join Date
    Jul 2006
    Beans
    4,860

    Samba. Cannot delete files on network share, yet 777 rights were granted.

    I have a Samba setup here. Everybody writes to my desktop as a means of backing up files.

    My brother is unable to delete files in his share. He gets "make sure the disk is not full or write-protected and that the file is not currently in use."

    I granted 777 rights to his folder. Why the hell is it denied? What can I look for? I thought sudo chmod 777 to his folder was all I'd need to do to give him full blown access.

  2. #2
    Join Date
    Feb 2007
    Location
    New Jersey, USA
    Beans
    318

    Re: Samba. Cannot delete files on network share, yet 777 rights were granted.

    There are separate permissions for the share. They are applied over the actual permissions of the directory in the filesystem. So the directories permissions on your computer represent he most lenient permissions possible, however when you create the share you can limit them further (but not reduce them).

    To edit the permissions of the share you need to look in /etc/samba/smb.conf or I'm pretty sure Ubuntu has a nice GUI for doing it.
    Disclaimer: All of my advice is guaranteed without exception to work. If you find my advice unsatisfactory, you didn't do it right.

  3. #3
    Join Date
    Jul 2006
    Beans
    4,860

    Re: Samba. Cannot delete files on network share, yet 777 rights were granted.

    Where in smb.conf? I'm looking all over the entire config file and I see nothing relevant to what I need.

    Only thing I see is simply

    Browseable = yes
    Writable = yes

    djfaklsjdl;kfsa

  4. #4
    Join Date
    Jul 2006
    Beans
    4,860

    Re: Samba. Cannot delete files on network share, yet 777 rights were granted.

    Let me just be a little more descriptive here since I'm about to hit the sack for the night.

    I set up Samba. My brother has a share on my computer. It's mapped on his XP computer. I noticed he had his backup kind of sloppy, as far as how things were organized. I went to move everything to a folder and delete everything else, and it said access denied. It won't let me delete anything.

    So I thought I'd try in the GUI of my Ubuntu machine. Nope. Still can't.

    "share" is the main directory on my spare hard drive for backups.
    "curt" is a folder (user) that resides in the share folder for backups.

    I granted 777 rights to "share"

    Doesn't curt and all of the others in the share folder take on the same rights?

    Note - I even tried issuing 777 rights to curt's individual folder, and it still barked at me with an error.

    The Goal: I need Curt to be able to read/write/delete ANY file and ANY folder within "share/curt". That is HIS folder for backing items up, I want him to organize it the way he would like.

  5. #5
    Join Date
    Feb 2007
    Location
    New Jersey, USA
    Beans
    318

    Re: Samba. Cannot delete files on network share, yet 777 rights were granted.

    You need to read the smb.conf manual page, you can access it by typing "man smb.conf" into the terminal.

    You'll be adding a section that defines your brother share (or modifying the current one) to something like:
    Code:
    [curts_share]
    path = /share/curt
    read only = no
    There is an ENORMOUS amount of options listed in this file. There are quite a few options which allow you to specify permissions in the octal format. You need to look through the man page and define the share exactly how you want it. (And again, I'm pretty sure that there is a GUI somewhere to help you do this)
    Last edited by Meson; September 24th, 2008 at 05:58 AM.
    Disclaimer: All of my advice is guaranteed without exception to work. If you find my advice unsatisfactory, you didn't do it right.

  6. #6
    Join Date
    Jul 2006
    Beans
    4,860

    Re: Samba. Cannot delete files on network share, yet 777 rights were granted.

    fyi, adding that tag didn't work.

    I'll read the man page tomorrow. I'm past due on sleep. Thanks for the help thus far! I'll post back tomorrow afternoon when I work on this some more.

    Anymore from anybody else, awhile?

  7. #7
    Join Date
    Feb 2005
    Location
    Nova Scotia, Canada
    Beans
    439

    Re: Samba. Cannot delete files on network share, yet 777 rights were granted.

    From the command line you can give chmod a -R option to make it recursively change permissions on all files/sub-directories. The default is to just change the directory you specify.

    So from the command line above share you could type:
    Code:
    chmod -R 777 ./share/*
    The '/*' may not be necessary but won't hurt. If you get an error try running it with sudo in front of the command. Also, typing ls -l in a directory will show a detailed directory listing with permissions and file sizes shown.

  8. #8
    Join Date
    Feb 2007
    Location
    New Jersey, USA
    Beans
    318

    Re: Samba. Cannot delete files on network share, yet 777 rights were granted.

    Quote Originally Posted by Roasted View Post
    Anymore from anybody else, awhile?
    Roasted... are you from PA?


    Changing the permissions of the directory is not what you need to do. You need to change the permissions of the SHARE. Think of the share as a layer inbetween the directory and the remote user. The user sees the permissions of the SHARE not the directory. The share only has access to the folder as far as the directory permissions let it.

    So if the directory is rwx, the share can do whatever it wants. If the directory is r-x, then the share can at best be r-x, but it can aslo be r-- or --x or ---, but it can never be rwx or -w-, or anything with a write.
    Disclaimer: All of my advice is guaranteed without exception to work. If you find my advice unsatisfactory, you didn't do it right.

  9. #9
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Samba. Cannot delete files on network share, yet 777 rights were granted.

    @ Meson,

    There are separate permissions for the share. They are applied over the actual permissions of the directory in the filesystem.
    ...

    Changing the permissions of the directory is not what you need to do. You need to change the permissions of the SHARE. Think of the share as a layer in between the directory and the remote user.
    These two statements are not so. The Samba server in no way grants or denies permissions for the file system. Samba only authenticates the users access to the share. All authorization is done through the FS permissions. File creation can be controlled Samba with create and dir masks. In my Samba setup I force a common group (smbusers) even if it is a guest (I named smbguest). It's even possible to limit the authenticated users ability to delete files, but this is done using the Linux "sticky bit", not Samba.

    @ Roasted,
    I can't tell you without seeing the file structure why the world rights are not allowing the files to be moved or deleted but the answer is in the FS structure and user ownership. Not directly with Samba.

    How about a post of with how you mounted the share, some the directory contents and file structure, and the share portion of your smb.conf file.
    Last edited by bab1; September 24th, 2008 at 08:00 AM.
    -BAB1

  10. #10
    Join Date
    Sep 2008
    Beans
    570

    Re: Samba. Cannot delete files on network share, yet 777 rights were granted.

    You asked for any ideas. I have one though it may not apply. Firefox inexplicably refused
    to download files into /home/textonyx/Downloads. I tried chmod 777 lots of time on the
    Downloads directory and they all failed. Finally I tried chown, after finding out the
    reason I couldn't download was because the directory was owned by root and it wouldn't
    let an ordinary user write to it. I have not tested to see if this idea applies to Samba shares.
    The good news is that I came across a bunch of excellent tutorials by swerdna.
    http://www.swerdna.net.au/linux.html
    A Script that Troubleshoots Samba
    Automagically diagnose configuration errors for Workgroups
    TeX: He has several other tutorial pertaining to Samba also.
    It may be a group hug thing, good luck -- TeXtonyx

Page 1 of 4 123 ... LastLast

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
  •