Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

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

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

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

    Quote Originally Posted by Meson View Post
    This issue is still with smb.conf. You need to change the fmask and dmask of the files that are created. You should want something like read-write for files and read-write-execute for folders. (6 and 7 respectively) Keep in mind that when talking about file permissions, "mask" is the opposite of what you want to take place (so 1 and 0 respectively)
    I don't believe that's true. Here's why.

    My folder is perfectly fine. Curt, Tyler, and Pam's are not.

    For the user section in the smb.conf file, each user has the same exact permission.

    Yet, mine is fine. Their's is not. How is that still a Samba issue? Besides, I've used this SAME EXACT smb.conf file before. I have it saved on a flash drive, so whenever I format I just load it back up and everything works.

  2. #22
    Join Date
    Sep 2006
    Beans
    67

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

    It seems like this discussion is going around in circles a bit.

    We need you to post the output of the following:

    Code:
    sudo testparm
    (Press enter when it prompts you to press it to "see a dump of your service definitions)

    And:

    Code:
    pwd
    ls -al
    (From the root of your shares).

    To quote the smb.conf man page, "The access rights granted by the server are masked by the access rights granted to the specified or guest UNIX user by the host system. The server does not grant more access than the host system grants."

  3. #23
    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
    My folder is perfectly fine. Curt, Tyler, and Pam's are not.
    But aren't you accessing your folder from your local computer and they from a remote computer via Samba?

    Try showing us some info like the output of the following:
    Code:
    $ ls -al /samba_share
    $ ls -al /samba_share/curt
    $ ls -al /samba_share/pam
    $ ls -al /samba_share/roasted
    
    $ cat /etc/samba/smb.conf
    Also, place the output between code tags (<code> stuff </code> - replace the <> with []) so it's easier to read. One for the ls commands and one for smb.conf.

    I've also found AppArmor to be the culprit in mysterious permissions issues. Try disabling it for awhile:
    Code:
    $ sudo /etc/init.d/apparmor stop
    Last edited by Meson; September 25th, 2008 at 01:18 AM.
    Disclaimer: All of my advice is guaranteed without exception to work. If you find my advice unsatisfactory, you didn't do it right.

  4. #24
    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.

    I agree with stickmangumby. We are getting nowhere just talking. Nothing can be dianosed without the data.

    Not to be jumping on Meson all the time, but this is wrong:
    Keep in mind that when talking about file permissions, "mask" is the opposite of what you want to take place (so 1 and 0)...
    The linux umask is that way but not Samba. See: http://www.cyberciti.biz/tips/how-do...ba-shares.html
    -BAB1

  5. #25
    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.

    But aren't you accessing your folder from your local computer and they from a remote computer via Samba?
    Don't assume anything.
    -BAB1

  6. #26
    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 bab1 View Post
    Not to be jumping on Meson all the time, but this is wrong:

    The linux umask is that way but not Samba. See: http://www.cyberciti.biz/tips/how-do...ba-shares.html
    *kneels* - my bad, there I go assuming again!
    Disclaimer: All of my advice is guaranteed without exception to work. If you find my advice unsatisfactory, you didn't do it right.

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

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

    sudo testparm-



    jason@jason-hardy:~$ sudo testparm
    [sudo] password for jason:
    Load smb config files from /etc/samba/smb.conf
    Processing section "[jason]"
    Processing section "[curt]"
    Processing section "[tyler]"
    Processing section "[pam]"
    Processing section "[printers]"
    Processing section "[print$]"
    Loaded services file OK.
    Server role: ROLE_STANDALONE
    Press enter to see a dump of your service definitions

    [global]
    netbios name = HARDY
    server string = %h server (Samba, Ubuntu)
    obey pam restrictions = Yes
    passdb backend = tdbsam
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *passwd:*password\supdated\ssuccessfully* .
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    dns proxy = No
    panic action = /usr/share/samba/panic-action %d
    invalid users = root

    [jason]
    path = /home/jason
    invalid users = curt, tyler, pam
    valid users = jason
    read only = No

    [curt]
    path = /media/share/curt
    invalid users = pam, tyler
    valid users = curt, jason
    read only = No

    [tyler]
    path = /media/share/tyler
    invalid users = curt, pam
    valid users = tyler, jason
    read only = No

    [pam]
    path = /media/share/pam
    invalid users = curt, tyler
    valid users = pam, jason
    read only = No

    [printers]
    comment = All Printers
    path = /var/spool/samba
    create mask = 0700
    printable = Yes
    browseable = No

    [print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers
    jason@jason-hardy:~$




    ls -al


    jason@jason-hardy:~$ ls -al
    total 1116
    drwxr-xr-x 66 jason jason 4096 2008-09-24 21:21 .
    drwxr-xr-x 7 root root 4096 2008-08-05 17:53 ..
    drwx------ 3 jason jason 4096 2008-07-08 22:15 .adobe
    drwxr-xr-x 2 jason jason 4096 2008-09-24 00:03 Alice in Chains
    drwxr-xr-x 2 jason jason 4096 2008-09-21 13:16 .audacity1.3-jason
    drwxr-xr-x 4 jason jason 4096 2008-09-21 13:16 .audacity-data
    drwxr-xr-x 3 jason jason 4096 2008-07-10 20:08 .avidemux
    -rw------- 1 jason jason 9951 2008-09-24 08:14 .bash_history
    -rw-r--r-- 1 jason jason 220 2008-07-08 17:33 .bash_logout
    -rw-r--r-- 1 jason jason 2940 2008-07-08 17:33 .bashrc
    drwxr-xr-x 4 jason jason 4096 2008-07-08 21:50 .cache
    drwxr-xr-x 2 jason jason 4096 2008-09-21 13:16 Chopped MP3s (ringtones)
    drwx------ 3 jason jason 4096 2008-07-10 22:33 .compiz
    drwxr-xr-x 10 jason jason 4096 2008-07-21 23:05 .config
    -rw-r--r-- 1 jason jason 58 2008-09-24 08:09 .DCOPserver_jason-hardy__0
    lrwxrwxrwx 1 jason jason 38 2008-09-24 08:09 .DCOPserver_jason-hardy_:0 -> /home/jason/.DCOPserver_jason-hardy__0
    drwxr-xr-x 2 jason jason 4096 2008-09-24 00:37 Desktop
    -rw------- 1 jason jason 26 2008-09-24 00:15 .dmrc
    drwxr-xr-x 7 jason jason 4096 2008-08-29 15:07 Documents
    drwxr-xr-x 3 jason jason 4096 2008-09-15 22:31 .dropbox
    drwxr-xr-x 5 jason jason 4096 2008-07-20 01:49 .dvdcss
    -rw------- 1 jason jason 16 2008-07-08 21:39 .esd_auth
    drwxr-xr-x 7 jason jason 4096 2008-09-23 20:19 .evolution
    drwx------ 2 jason jason 4096 2008-09-15 18:02 .filezilla
    drwxr-xr-x 9 jason jason 4096 2008-05-22 19:21 Finished
    drwxr-xr-x 2 jason jason 4096 2008-08-08 02:06 .fontconfig
    drwxr-xr-x 5 jason jason 4096 2008-07-14 23:07 FrostWire
    drwxr-xr-x 6 jason jason 4096 2008-09-23 20:59 .frostwire4.17
    drwx------ 5 jason jason 4096 2008-09-24 00:15 .gconf
    drwx------ 2 jason jason 4096 2008-09-24 21:23 .gconfd
    drwxr-xr-x 22 jason jason 4096 2008-09-22 00:05 .gimp-2.4
    -rw-r----- 1 jason jason 0 2008-09-24 17:44 .gksu.lock
    drwxr-xr-x 3 jason jason 4096 2008-08-03 13:15 .gnome
    drwx------ 14 jason jason 4096 2008-09-23 22:51 .gnome2
    drwx------ 2 jason jason 4096 2008-09-14 01:30 .gnome2_private
    drwx------ 2 jason jason 4096 2008-09-24 00:15 .gnupg
    drwx------ 6 jason jason 4096 2008-08-12 16:20 .googleearth
    drwxr-xr-x 9 jason jason 4096 2008-05-12 20:29 google-earth
    drwxr-xr-x 2 jason jason 4096 2008-08-09 13:11 .gstreamer-0.10
    -rw-r--r-- 1 jason jason 108 2008-09-24 00:16 .gtk-bookmarks
    -rw-r--r-- 1 jason jason 222 2008-08-11 20:41 .gtk-custom-papers
    dr-x------ 3 jason jason 0 2008-09-24 00:15 .gvfs
    drwxr--r-- 2 jason jason 4096 2008-09-16 22:45 .hardinfo
    -rw------- 1 jason jason 19469 2008-09-24 08:09 .ICEauthority
    drwxr-xr-x 3 jason jason 4096 2008-07-12 01:34 .icons
    drwxr-xr-x 2 jason jason 4096 2008-09-23 20:27 Incomplete
    drwxr-xr-x 4 jason jason 4096 2008-08-25 23:05 .java
    drwx------ 3 jason jason 4096 2008-07-10 22:09 .kde
    -rw-r----- 1 jason jason 6 2008-08-25 23:46 .ktorrent.lock
    drwxr-xr-x 3 jason jason 4096 2008-07-08 21:39 .local
    drwx------ 3 jason jason 4096 2008-07-08 22:15 .macromedia
    drwxr-xr-x 3 jason jason 4096 2008-07-10 22:11 .mcop
    drwx------ 3 jason jason 4096 2008-07-08 21:39 .metacity
    drwx------ 4 jason jason 4096 2008-07-09 00:23 .mozilla
    drwx------ 3 jason jason 4096 2008-07-09 00:23 .mozilla-thunderbird
    drwxr-xr-x 2 jason jason 4096 2008-07-12 22:59 .mplayer
    drwxr-xr-x 100 jason jason 4096 2008-09-01 00:03 Music
    drwxr-xr-x 2 jason jason 20480 2008-09-21 12:48 Music Videos
    drwxr-xr-x 3 jason jason 4096 2008-09-21 21:06 .nautilus
    drwx------ 3 jason jason 4096 2008-08-26 17:03 .openoffice.org2
    drwxr-xr-x 53 jason jason 4096 2008-09-14 10:54 Pictures
    -rw-r--r-- 1 jason jason 586 2008-07-08 17:33 .profile
    drwxr-xr-x 2 jason jason 4096 2008-07-14 23:19 .pulse
    -rw------- 1 jason jason 256 2008-07-08 21:39 .pulse-cookie
    drwx------ 5 jason jason 4096 2008-09-24 21:18 .purple
    drwxr-xr-x 2 jason jason 4096 2008-08-05 17:34 .qt
    drwxr-xr-x 2 jason jason 4096 2008-07-22 22:00 .quicksynergy
    -rw------- 1 jason jason 2188 2008-08-31 23:23 .recently-used
    -rw-r--r-- 1 jason jason 745716 2008-09-24 21:21 .recently-used.xbel
    -rw-r--r-- 1 jason jason 237 2008-09-16 16:14 .registry
    drwxrwx--- 3 jason jason 4096 2008-08-02 14:14 .sane
    drwxr-xr-x 2 jason jason 4096 2008-09-24 08:14 Shared
    drwx------ 2 jason jason 4096 2008-07-08 21:39 .ssh
    -rw-r--r-- 1 jason jason 0 2008-07-08 21:40 .sudo_as_admin_successful
    drwxr-xr-x 52 jason jason 4096 2008-07-12 02:09 .themes
    drwx------ 5 jason jason 4096 2008-07-12 11:47 .thumbnails
    drwxr-xr-x 5 jason jason 4096 2008-08-25 23:45 .transmission
    -rw------- 1 jason jason 1947 2008-07-17 23:13 .Trash
    drwxr-xr-x 2 jason jason 4096 2008-07-08 21:40 .update-manager-core
    drwx------ 2 jason jason 4096 2008-07-25 16:52 .update-notifier
    drwxr-xr-x 3 jason jason 4096 2008-09-16 16:19 USB Jumpdrive Backup
    drwxr-xr-x 2 jason jason 4096 2008-09-16 16:14 Videos
    drwxr-xr-x 3 jason jason 4096 2008-07-20 01:48 .vlc
    drwxr-xr-x 2 jason jason 4096 2008-08-09 13:29 .wapi
    -rw------- 1 jason jason 122 2008-09-24 00:15 .Xauthority
    drwxr-xr-x 2 jason jason 4096 2008-07-17 23:09 .xine
    -rw-r--r-- 1 jason jason 146 2008-07-13 16:23 .xscreensaver-getimage.cache
    -rw-r--r-- 1 jason jason 9352 2008-09-24 21:23 .xsession-errors
    jason@jason-hardy:~$




    Note-

    On my local desktop, everything works for me.
    On my laptop exploring my share on my desktop, everything works for me.
    On my local desktop as well as my laptop, I cannot delete files in curt/tyler/pam's directories... just like they can't delete files on their local computers from within their server share.

    So, yeah, shouldn't be assuming. I was using my laptop as a neutral testing ground with this situation.
    Last edited by Roasted; September 25th, 2008 at 02:29 AM.

  8. #28
    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.

    A good example of people "separated by a common language".

    We really need to see the directory structure where the problem is. So if the problem is /media/share/USER, then we should be looking at that. In plain English, show us /media/share/ and /media/share/curt and /media/share/tyler and /media/share/pam.

    Just because you can do something doesn't mean you should do it.

    Code:
    [jason]
    	path = /home/jason
    	invalid users = curt, tyler, pam <-this is not needed
    	valid users = jason
    	read only = No
    
    [curt]
    	path = /media/share/curt
    	invalid users = pam, tyler <-this is not needed
    	valid users = curt, jason
    	read only = No
    On the other hand, this is recommended.

    Code:
    [curt]
    	path = /media/share/curt
    	valid users = curt, jason
    	read only = No
            create mask = 777
            directory mask = 777
    Some good practice rules might be:

    1. All Samba users must be part of the same group
    -- My users are all in the smbusers group.

    2. All private directories should be controlled by the use of the [homes] share.
    -- My users are all in the /smb/home path.
    -- See mine below:
    Code:
    [homes]
            comment = Samba Home Directory
            path = /smb/home/%S  <----This can be /media/share/%S
            browseable = no
            guest ok = no
    ; Only the logged in user allowed
            valid users = %S +smbusers <-- +smbusers is the group 
            force group = smbusers
            writable = yes
            create mask = 770
            directory mask = 770
    -BAB1

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

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

    I took your advice on removing invalid users and adding the 777 lines, but is the smbusers thing really necessary? I used to have this working perfectly, so I know it's possible to run without the additional smbusers thing. *shrug*

    I'm just going to compare Jason (my folder, works) and Curt's. Whatever is wrong with Tyler, Pam, and Curt is the same thing, I know that much. So to keep things simple we'll just work with Curt here.

    The following is a screenshot of Curt's permissions as well as mine. Is this what you guys wanted? Maybe I'm missing something but I wasn't sure what else you guys would need.. Hope this is it.


    http://s2.photobucket.com/albums/y36...ent=samba1.png

    http://s2.photobucket.com/albums/y36...ent=samba2.png

  10. #30
    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.

    So what happened when you added/deleted the various bits in smb.conf? You did restart the smbd daemon; right?

    Did you look to see if those permissions showed up on the newly created files and folders?

    but is the smbusers thing really necessary?
    Jason, nothing is necessary, it just works more consistently. I think the operative words are "I used to have this working perfectly..." We want it to work now. What changed?

    The use of a common group allows for easier management. It is not needed if the others can take care of themselves. But they are not able (by your account), and you are the go to man! It makes your life easier.

    The screen shots don't really mean anything to me. You need to capture the data of ls -l on the directory we are testing and paste it into a reply. We can't help you very much if you can't supply the data.

    I think it is a good idea on your part to only test one users directory. Once that is correct you can apply it to the others. As you said.
    -BAB1

Page 3 of 4 FirstFirst 1234 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
  •