Samba Share is Read Only


Results 1 to 7 of 7

Thread: Samba Share is Read Only

  1. #1
    Join Date
    Mar 2004
    Location
    Atlanta, GA, USA
    Posts
    15

    Samba Share is Read Only

    I have a FC2 Server (CullyTech2) and a FC2 client (CullyTech3). I can read from the server share via Samba but I cannot write to the directory when not logged in as 'root'.

    Here is the mount command:
    [root@cullytech3 root]# mount -t smbfs -o username=kcully,password=secret //192.168.15.130/allshare /home/kcully/cullytech2share

    The owner on this directory after mounting is 'root' and the group is 'root'. If from within a terminal logged in as root, I issue a "touch /home/kcully/cullytech2share/test.txt' the file is created.

    So then I tried
    [root@cullytech3 root]# chown kcully /home/kcully/cullytech2share
    chown: changing ownership of `/home/kcully/cullytech2share': Operation not permitted

    Have I missed a step?

    Thanks,
    Kevin
    kcully

  2. #2
    Join Date
    Sep 2004
    Location
    /home/
    Posts
    1,204
    1.make sure the file your sharing isnt read only

    2.make sure your smb.conf the share isnt readonly=yes

    3.when you mount the drive you may need to add fmask and dmask arguments.

    probaly #3 fmask=0777 and dmask=0777, one of the may be umask instead but i can't remember, i think this is correct, but you may want to make sure this is secure. these settings i think give everybody access.


    soule
    Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey

    IRC #linuxn00b

    Support your Distro.
    Slackware Store
    Archlinux Schwag

  3. #3
    Join Date
    Mar 2004
    Location
    Atlanta, GA, USA
    Posts
    15
    I checked on #1 and #2. There wasn't a readonly=yes line in the smb.conf file.

    I tried #3 with limited results. Logged in as 'root', I issued the following mount command:
    [root@cullytech3 kcully]# mount -t smbfs -o username=kcully,password=secret,umask=000,fmask=77 7,dmask=777 //192.168.15.130/allshare /home/kcully/cullytech2share

    I then opened another terminal and did the following:
    [kcully@cullytech3 cullytech2share]$ ll
    total 4
    drwxr-xr-x 1 root root 0 Dec 14 15:30 test
    -rw-r--r-- 1 root root 0 Dec 11 21:46 testfileSHARE.txt
    [kcully@cullytech3 cullytech2share]$ mkdir test2

    The 'mkdir test2' succeeded but it took several seconds.

    [kcully@cullytech3 cullytech2share]$ cd test2
    [kcully@cullytech3 test2]$ touch hellotest2.txt
    touch: cannot touch `hellotest2.txt': Permission denied
    [kcully@cullytech3 test2]$ cd ..
    [kcully@cullytech3 cullytech2share]$ ll
    total 8
    drwxr-xr-x 1 root root 0 Dec 14 15:30 test
    drwxr-xr-x 1 502 502 0 Dec 15 16:34 test2
    -rw-r--r-- 1 root root 0 Dec 11 21:46 testfileSHARE.txt

    Isn't it interesting that the 'owner' and 'group' are 502 on the directory 'test2'? I am able to create files and subdirectories. However I am unable to create files in those subdirectories and the performance is horrible. Any tips? (Other than switch to NFS?)

    -Kevin
    kcully

  4. #4
    Join Date
    Sep 2004
    Location
    /home/
    Posts
    1,204
    remove the umask comment

    use dmask=0777
    fmask=0777


    soule
    Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey

    IRC #linuxn00b

    Support your Distro.
    Slackware Store
    Archlinux Schwag

  5. #5
    Join Date
    Mar 2004
    Location
    Atlanta, GA, USA
    Posts
    15
    Still have read-only permissions to the subdirectories.

    [root@cullytech3 kcully]# umount /home/kcully/cullytech2share
    [root@cullytech3 kcully]# mount -t smbfs -o username=kcully,password=secret,fmask=0777,dmask=0 777 //192.168.15.130/allshare /home/kcully/cullytech2share

    Then in a new separate terminal:
    [kcully@cullytech3 cullytech2share]$ ll
    total 4
    drwxr-xr-x 1 root root 0 Dec 14 15:30 test
    -rw-r--r-- 1 root root 0 Dec 11 21:46 testfileSHARE.txt
    [kcully@cullytech3 cullytech2share]$ touch helloshare.txt
    ... comment: about 30 seconds pass here ...

    touch: setting times of `helloshare.txt': Input/output error
    [kcully@cullytech3 cullytech2share]$ ll
    total 4
    -rw-r--r-- 1 502 502 0 Dec 15 17:16 helloshare.txt
    drwxr-xr-x 1 root root 0 Dec 14 15:30 test
    -rw-r--r-- 1 root root 0 Dec 11 21:46 testfileSHARE.txt
    [kcully@cullytech3 cullytech2share]$ mkdir test5
    ... comment: about 30 seconds pass here ...
    [kcully@cullytech3 cullytech2share]$ cd test5
    [kcully@cullytech3 test5]$ touch hellotest5.txt
    touch: cannot touch `hellotest5.txt': Permission denied

    Thanks for your help.
    -Kevin
    kcully

  6. #6
    Join Date
    Sep 2004
    Location
    /home/
    Posts
    1,204
    are you logging in to both systems as the same user.

    if not does the user you are logging in as have write permission to the files you are mounting. i had the same problem for a while with my FC2 box, including the lag, but the fmask,dmask thing fixed that. when i get home ill look at my box to see if im forgetting something


    soule
    Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey

    IRC #linuxn00b

    Support your Distro.
    Slackware Store
    Archlinux Schwag

  7. #7
    Join Date
    Mar 2002
    Location
    Pennsylvania, USA
    Posts
    1,713
    You need to include the uid or gid paramaters with your mount command. See this article in the JL Library for help on including them in your command:

    http://www.justlinux.com/nhf/Filesys...rmanently.html
    If God hadn't meant for us to use GUI tools, there wouldn't have been a Xerox PARC.

Posting Permissions

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