DesignerBoy
Posts: 11
Joined: Fri Apr 19, 2013 9:54 pm

Samba Permissions

Fri Apr 19, 2013 10:07 pm

Hello, new to all this and getting frustrated.

I have followed 2 guides on how to set up a shared folder ( NAS ) using the raspberry pi.

Each time I get the same problems. Permissions. Accessing the shared file from another machine on my network can see all the files, but does not have permission to write. Very annoying.

Using these 2 guides

http://www.howtogeek.com/139433/how-to- ... ge-device/

And then tried this

http://www.simonthepiman.com/how_to_set ... server.php

Both are very similar, just a few differences in the samba config setup. However I can't get either of them to work.

I know it is a permission problem, what is going wrong?

Out of interest, when I mount the USB drive to my newly created folder the user and group are both root? I suspect this may be part of the issue and I can't change it either.

Please some nice person help a complete new user. Is there a better guide to follow?

Thanks.

bugloss
Posts: 22
Joined: Fri Jan 04, 2013 2:44 pm
Contact: Website

Re: Samba Permissions

Tue Apr 23, 2013 5:23 pm

Dear Frustrated Designerboy,

I'm about to embark on a samba openswan type server thingy. I'll get back to you about the Samba bit sometime tomorrow.

Done the openswan server/client jig so doing the Samba can't be much harder. Can it? :roll:

Did you make a copy of the smb.conf before you started changing the settings if so start a fresh.
------------------------------------------------LATER ON-----------------------------------------------------------
Here's a link to the tutorial I followed. http://elinux.org/R-Pi_NAS

Worked well, I'm on a mac and it reads and writes ok.

In the section:

Configure private storage areas on the RPi

Configure samba to allow each user to access his home directory.
Open the smb.conf file in nano
sudo nano /etc/samba/smb.conf
Search for the section starting [homes]
*****In the [homes] section, change from
read only = yes
to
read only = no*****

This may be where your problem lies.

Hope it helps. I've gone grey and become short sighted because of this thing but stick with it and it will suddenly begin to make sense. Good luck. :)
Adam

Edit
You can see the file permissions by navigating to the directory where the files are in the terminal and typing: ls -la

That will list the files in that directory and the morse code type text at the beginning tells you what permissions you have set.

http://www.youtube.com/watch?v=omK2Rht3Mwo @ 21 minutes gives an explanation to what it means.
Last edited by bugloss on Wed Apr 24, 2013 5:47 am, edited 1 time in total.
http://www.adamwilson.co

klricks
Posts: 6849
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Samba Permissions

Wed Apr 24, 2013 12:48 am

Use chown command to change users to pi. This will change all files in the current directory to user=pi, group=pi
sudo chown pi:pi *

You may also need to set permissions on the files with chmod command. The following command will change all files in the current directory to 775 = rwxrwxr.x
sudo chmod 775 *
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: Samba Permissions

Wed Apr 24, 2013 1:56 am

force user = "root"

palgume
Posts: 1
Joined: Thu Jan 05, 2017 12:59 am

Re: Samba Permissions

Thu Jan 05, 2017 1:10 am

if you followed the tutorial in the link you provided you are where i was for about a week
let me guess you created share on freshly formatted disk????
only ROOT/SUDO can edit that directory because it takes sudo command to mount (regardless of partition type)
here is what you do
open terminal and type :

sudo chown pi:pi /directoryofyourdiskmountpoint -R

whatever your empty directory is where you mount your disk - lets assume it's /dysk

then you type (in terminal)
sudo chown pi:pi /dysk -R
naturally i'm assuming your user is pi

Return to “Troubleshooting”