Dwozzz
Posts: 6
Joined: Mon May 29, 2017 7:17 pm

[Solved - I think???] Samba Permissions NAS nightmare!

Tue May 30, 2017 10:33 am

Background: I am a complete noob to this kind of computing - I've managed to get my Retro Pie working and this was relatively straight forward.

Problem: I followed this guide https://www.pi-supply.com/make/build-yo ... pberry-pi/ down to Step 13. But, instead of looking like the screenshots in the guide, my project looks like this...Image and I when I click next to try and get to database section it just loops me back to this page.

I'm using a raspberry pi zero w - could this be causing the problem as an Ethernet is required? If this is the case, is there a work around?

I'm trying to set up a folder that is accessible in the first instance on my network but then also share it online so my family can access it too. Its going to be a drop site for videos collected from my ip camera watching a bird box (Rock and Rll - I know :lol: )
The camera is all working but just needs to be pointed to a file server or network folder to drop the files.

Thanks for any help in advance.
Last edited by Dwozzz on Wed May 31, 2017 1:44 pm, edited 1 time in total.

Dwozzz
Posts: 6
Joined: Mon May 29, 2017 7:17 pm

Re: Own Cloud (Apache, MySQL) - Followed a guide.

Wed May 31, 2017 1:20 pm

Okay, I've literally followed page 39 of this month's MagPi letter for letter and it's still not letting me access the folder?
https://www.raspberrypi.org/magpi-issues/MagPi58.pdf

I only made one difference and that was I mounted the usb dev to the dir created... I used:
sudo mount /dev/sda1 /share

Could this be the problem? I literally have no idea here :(

Dwozzz
Posts: 6
Joined: Mon May 29, 2017 7:17 pm

Re: Own Cloud (Apache, MySQL) - Followed a guide.

Wed May 31, 2017 1:44 pm

Wow, wow, wow - I think it's finally working!!!!

I did a couple of extra things (Not my doing I read various guides from other people but thought it hadn't worked so closed all browsers down. After a sudo reboot it appeared this had worked?!? Sorry if this was your work - I'm not taking credit:

In the /etc/samba/smb.conf I changed:

1) Under [Global]
WINS support =yes (It was no)

2) Under [homes]
read only =no (It was yes)

3) I did sudo chown pi:pi /nameofdirectorycreated -R

I restarted Samba each time but got frustrated as it didn't work...
Then gave up, did a sudo reboot and somewhere along the way it fixed it :shock: :? 8-)

Hope this helps someone else too?

hortimech
Posts: 381
Joined: Wed Apr 08, 2015 5:52 pm

Re: [Solved - I think???] Samba Permissions NAS nightmare!

Wed May 31, 2017 4:03 pm

What you have set up there is a standalone server and there are several things wrong with it, I could re-write the share as:

[share]
# This is a wide open share,
# ANYBODY can connect and read files.
Comment = Pi shared folder
Path = /share
read only = No
create mask = 0777
directory mask = 0777
Guest ok = yes

But I wouldn't, because it isn't secure, the howto goes on to tell you to create a Samba user, why ? you don't need one because 'guest ok' is set to 'yes', from 'man smb.conf'

guest ok (S)

If this parameter is yes for a service, then no password is
required to connect to the service. Privileges will be those of the
guest account.

Mainly, what I don't understand is, why does nobody think of reading the packages documentation ? In this case, the Samba wiki, where we have a page dedicated to setting up a standalone server:

https://wiki.samba.org/index.php/Settin ... one_Server

Dwozzz
Posts: 6
Joined: Mon May 29, 2017 7:17 pm

Re: [Solved - I think???] Samba Permissions NAS nightmare!

Sun Jun 11, 2017 5:16 pm

hortimech wrote:What you have set up there is a standalone server and there are several things wrong with it, I could re-write the share as:

[share]
# This is a wide open share,
# ANYBODY can connect and read files.
Comment = Pi shared folder
Path = /share
read only = No
create mask = 0777
directory mask = 0777
Guest ok = yes

But I wouldn't, because it isn't secure, the howto goes on to tell you to create a Samba user, why ? you don't need one because 'guest ok' is set to 'yes', from 'man smb.conf'

guest ok (S)

If this parameter is yes for a service, then no password is
required to connect to the service. Privileges will be those of the
guest account.

Mainly, what I don't understand is, why does nobody think of reading the packages documentation ? In this case, the Samba wiki, where we have a page dedicated to setting up a standalone server:

https://wiki.samba.org/index.php/Settin ... one_Server
I will try my best to explain;

The main reason is time. We want to be able to get the thing working without spending every evening for a month typing long strings into a terminal for it to still not work at the end. Many of us noobs aren't used to linux / raspbian / programming and are just trying to follow guides to help us meet our end goals. We execute sudo command after sudo command not having a clue what its doing or why we are doing it - hoping it will "work". When we try to read further into the subject - people who are in the know make many assumptions of what people will already know when reaching their sites and miss out 'obvious' parts as they should already be done / known - result....it doesn't work. I understand that it is all about learning however, when you are constantly back tracking trying to get one thing working and then you have to back track to fix the fix and then back track to fix the fix before fixing the fix, you get to the end of your tether and reach out for help. Why can't anyone write a nice, clear guide that explains how to do this and include a why it didn't work section for problems like mine. Because, although I'm sure your answer is excellent...I'm still no clearer on what I need to do.
Many Thanks

hortimech
Posts: 381
Joined: Wed Apr 08, 2015 5:52 pm

Re: [Solved - I think???] Samba Permissions NAS nightmare!

Sun Jun 11, 2017 6:53 pm

Dwozzz wrote: I will try my best to explain;

The main reason is time. We want to be able to get the thing working without spending every evening for a month typing long strings into a terminal for it to still not work at the end. Many of us noobs aren't used to linux / raspbian / programming and are just trying to follow guides to help us meet our end goals. We execute sudo command after sudo command not having a clue what its doing or why we are doing it - hoping it will "work". When we try to read further into the subject - people who are in the know make many assumptions of what people will already know when reaching their sites and miss out 'obvious' parts as they should already be done / known - result....it doesn't work. I understand that it is all about learning however, when you are constantly back tracking trying to get one thing working and then you have to back track to fix the fix and then back track to fix the fix before fixing the fix, you get to the end of your tether and reach out for help. Why can't anyone write a nice, clear guide that explains how to do this and include a why it didn't work section for problems like mine. Because, although I'm sure your answer is excellent...I'm still no clearer on what I need to do.
Many Thanks
Whilst I can understand what you are saying and to a certain extent why you are saying it, I still don't understand why people will believe things written on a random website, but either don't believe things written on a packages wiki or never think to look there.
Just this week I have seen a couple of posts on the Samba mailing asking why a DC doesn't work after they faithfully followed some web post they found. The reason was, the instructions they followed were badly flawed and probably written by someone who had done the same thing, followed a flawed howto.

If you follow the wiki page I posted a link to, you should get a standalone Samba server, if you don't, I want to know why. I can then help to get your standalone server fixed and then fix any problems on the wiki page. If you don't follow Samba's wiki pages, but follow some howto you found out there on the internet, whilst I can try and help you fix your server, I cannot fix the howto, I do not have write access to it. I have pointed out glaring errors to a couple of howto's my attention was drawn to, the problems still haven't been fixed.

Rowland Penny
Samba team member

Return to “Networking and servers”