Results 1 to 7 of 7

Thread: How to set permissions for HDD access?

  1. #1
    Join Date
    Jan 2012
    Beans
    8

    How to set permissions for HDD access?

    Ok everyone, on to my next problem.

    I am trying to copy files to the HDD that is in my server from a Windows 7 PC.

    Here is what pops up on Windows



    Here is what is written in my Samba config file.

    [SDB HARD Disk]
    comment = public folder
    path = media/sdb1
    public = yes
    writable = yes --- Just a hunch, shouldn't this line let me move files around?
    create mask = 0777
    directory mask = 0777
    force user = SuperUser
    force group = homeusers

    All I tried to do was drag a photo from my desktop to the server to test if it would let me transfer files, and it would not.

    Everything Linux is unknown to me right now. I have never had any association with it, but I thought it would be worth a shot to have some extra data storage and gain some experience. I appreciate all of the help that may be provided.

    -Aaron

  2. #2
    Join Date
    Jun 2007
    Beans
    1,941

    Re: How to set permissions for HDD access?

    Quote Originally Posted by Aaron053191 View Post
    Ok everyone, on to my next problem.

    I am trying to copy files to the HDD that is in my server from a Windows 7 PC.

    Here is what pops up on Windows

    Here is what is written in my Samba config file.

    [SDB HARD Disk]
    comment = public folder
    path = media/sdb1
    public = yes
    writable = yes --- Just a hunch, shouldn't this line let me move files around?
    create mask = 0777
    directory mask = 0777
    force user = SuperUser
    force group = homeusers

    All I tried to do was drag a photo from my desktop to the server to test if it would let me transfer files, and it would not.

    Everything Linux is unknown to me right now. I have never had any association with it, but I thought it would be worth a shot to have some extra data storage and gain some experience. I appreciate all of the help that may be provided.

    -Aaron
    Well, let's start with a simple setup. You can "see" the share, so that's a good start. Let's modify the share a bit:

    Code:
    [SDB HARD Disk]
    comment = public folder
    path = /media/sdb1
    public = yes
    writable = yes
    guest account = nobody
    guest ok = yes
    create mask = 777
    directory mask = 777
    I added a few things, removed a few things... I think the most important piece is the path = however, I bolded it. You should have a forward slash before media, /media/sdb1...

    After making that change restart smb and try again:

    Code:
    sudo service smbd restart

  3. #3
    Join Date
    Jan 2012
    Beans
    8

    Re: How to set permissions for HDD access?

    I made those following changes, restarted SMB. Then I attempted to drag the file to the server once again. Yet, it is still telling me I do not have permissions to do so.

  4. #4
    Join Date
    Jun 2007
    Beans
    1,941

    Re: How to set permissions for HDD access?

    Quote Originally Posted by Aaron053191 View Post
    I made those following changes, restarted SMB. Then I attempted to drag the file to the server once again. Yet, it is still telling me I do not have permissions to do so.
    Hrm...

    This is insecure, but if you trust everyone on your LAN, change
    Code:
    security = user
    to
    Code:
    security = share
    in smb.conf.

    Also, perhaps you should try restarting nmbd...

    Code:
    sudo service nmbd restart
    Of course if you made a change to smb.conf, you should restart smbd again as well.

    If you'd like to read where I'm getting this from, here's the pages I'm using:

    https://help.ubuntu.com/11.04/server...ileserver.html

    https://help.ubuntu.com/community/Samba

    Edit - as a troubleshooting step, paste the output (in [ code] braces) of your complete smb.conf, and the result of these commands:
    Code:
    testparm
    Code:
    smbtree
    Hopefully some others will chime in, I'm far from an expert with samba... (you might want to put something about samba in the title, otherwise people won't know ) I typically just do the Webmin configuration and forget about it .
    Last edited by arrrghhh; January 13th, 2012 at 04:59 PM.

  5. #5
    Join Date
    Dec 2009
    Beans
    6,772

    Re: How to set permissions for HDD access?

    It may not be permissions by Samba. It may be permissions by Linux.

    What are the ownership and permissions of the target shared folder:
    Code:
    ls -dl /media/sdb1

  6. #6
    Join Date
    Jan 2012
    Beans
    8

    Re: How to set permissions for HDD access?

    Quote Originally Posted by Morbius1 View Post
    It may not be permissions by Samba. It may be permissions by Linux.

    What are the ownership and permissions of the target shared folder:
    Code:
    ls -dl /media/sdb1
    Thanks for the help, I re-installed Ubuntu and followed a tut on howtoforge.com

    I used the ls -dl /media/store (changed due to tut)

    and it looks it is owned my root if I am not mistaken.

    It says exactly drwxrwrwx 1 root root 4096 2012-1-13 7:01

    I'm pretty sure I need to change the ownership or something?

    I am sorry, I have found that I am following step by step tutorials and it is not teaching me exactly what I am looking at because I am acting as a programmed robot that is simply repeating a command.

  7. #7
    Join Date
    Jan 2012
    Beans
    8

    Re: How to set permissions for HDD access?

    Closed, not sure quite what I done, but I now have access to the folders and am transferring data right now.

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
  •