Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Death of Prime
Nov 3, 2005

Dead...for now
I've gotten to a point that now it can see the folder, but when I try and cd into the folder I get a permission denied error

Adbot
ADBOT LOVES YOU

tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe

Death of Prime posted:

I've gotten to a point that now it can see the folder, but when I try and cd into the folder I get a permission denied error



I got around that with the masking part of my fstab line, if that helps.

Mantle
May 15, 2004

https://beepberry.sqfmi.com/

Just ordered one of these, looks like a great portable chat terminal.

Dicty Bojangles
Apr 14, 2001

Mantle posted:

https://beepberry.sqfmi.com/

Just ordered one of these, looks like a great portable chat terminal.

I saw that and am so tempted… I drunkenly ordered a Zero W without any particular project in mind a couple weeks ago that finally arrived, and have spent the time trying to figure out what’s worth doing with the thing.

cruft
Oct 25, 2007

Death of Prime posted:

I've gotten to a point that now it can see the folder, but when I try and cd into the folder I get a permission denied error



show us ls -l

I bet you don't have the execute permission on that subdirectory

Death of Prime
Nov 3, 2005

Dead...for now

cruft posted:

show us ls -l

I bet you don't have the execute permission on that subdirectory

share is the folder I'm trying to get into

tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe

Death of Prime posted:

share is the folder I'm trying to get into


Yeah if you put the uid and gid options in your mount command, they should be mounted as the user you set. On a pi, this would be like,

code:
uid=pi,gid=pi
Full command would be something like:

code:
mount -t cifs -o username=pi,password=[pass],nofail,uid=pi,gid=pi //serverip/sharename /mnt/share

sb hermit
Dec 13, 2016





Dicty Bojangles posted:

I saw that and am so tempted… I drunkenly ordered a Zero W without any particular project in mind a couple weeks ago that finally arrived, and have spent the time trying to figure out what’s worth doing with the thing.

If you don't have a mini hdmi adapter and a usb otg adapter (with the correct dimensions! otherwise it's worthless) then you may want to consider picking them up.

The zero w doesn't use standard hdmi (the pi 4 uses hdmi micro, which is also incompatible), so you'd need it for display

The zero w also doesn't have standard usb ports, so you'll need the otg cable to plug a keyboard into it.

One nice thing about pi zero is that it takes very little power, so you can generally plug it into any usb slot and it works (the standard pi stuff tends to draw too much power). I'm working on some firmware that automatically plays movies when it's connected to a tv (since the tv can provide output via hdmi and power on the service port). Maybe you could use a bluetooth joypad and use it to play old console games?

sb hermit
Dec 13, 2016





there are a lot of projects out there that convert a pi zero to a handheld gaming device but the additional hardware costs money

likely you could just get by with, as I mentioned, connecting it to a tv and then connecting a joypad via bluetooth

sb hermit
Dec 13, 2016





Thanks Ants posted:

CIFS is not NFS

just want to repeat this

they are wildly different filesystems

it's dead simple to use and is a fine option if you have a secure network (i.e. you are't running it over the internet)

but it doesn't really do security. unless you use kerberos and a lot of other elbow grease and candle light, nfs doesn't even support encryption or logins. the most that pre nfs4 can do is only allow access to certain shares via the ip address of the client.

Anyways, since CIFS (aka SMB) works, just stick with that. It's what most small networks use without any issues.

Dicty Bojangles
Apr 14, 2001

Interesting, thanks - time to acquire more parts. Originally I wanted to use it as a headless Plexamp player hooked to my stereo, but in my drunken haste didn’t realize the Zero is 32bit, and headless Plexamp requires 64bit :tizzy:

cruft
Oct 25, 2007

tuyop posted:

Yeah if you put the uid and gid options in your mount command, they should be mounted as the user you set. On a pi, this would be like,

code:
uid=pi,gid=pi
Full command would be something like:

code:
mount -t cifs -o username=pi,password=[pass],nofail,uid=pi,gid=pi //serverip/sharename /mnt/share

You're not wrong, but this directory has no rwx for any user, even root.

Maybe this will work, OP, but I think you may be looking at some other problem.

sb hermit
Dec 13, 2016





maybe the user doesn't have read and write permissions on the directory on that share

can that share be mounted and viewed when using the same user and password on a standard computer?

Death of Prime
Nov 3, 2005

Dead...for now

sb hermit posted:

maybe the user doesn't have read and write permissions on the directory on that share

can that share be mounted and viewed when using the same user and password on a standard computer?

It can. I can even find the folder when in the GUI and file explorer. All my PCs see it and access it as well.

sb hermit
Dec 13, 2016





Death of Prime posted:

It can. I can even find the folder when in the GUI and file explorer. All my PCs see it and access it as well.

Sorry, it's just that a lot of stuff seems a bit confusing.

For this listing:


it looks like /mnt/share was mounted with //192.168.1.247/volume1

However, it didn't show the full permissions and ownership (like with ls -l)

Do you mind getting another screenshot? Also, can you look into the "Shared Videos" directory as root, or change permissions?

Also, for this listing:

Death of Prime posted:

share is the folder I'm trying to get into


was /mnt/share mounted as //192.168.1.247/volume1/'Shared Videos' ?

I just want to make sure because it helps with the mental model I'm building of how your setup is laid out and would really help to address an inconsistency

EDIT: fixed a share name

sb hermit
Dec 13, 2016





maybe I should get a synology, I've heard good stuff about them

the only thing I have within reach is a qnap, I think

Warbird
May 23, 2012

America's Favorite Dumbass

Syn’s are pretty dang good and largely turnkey one you set them up. I’d highly recommend them though if you’re homelabbing it up a dedicated hypervisor or compute box may be a good idea.

Alucard
Mar 11, 2002
Pillbug
This is my fstab config command for cifs with my Synology NAS

//NASIP/FOLDER /LOCALADDRESS cifs credentials=CREDENTIALSFILE,vers=3.0,uid=1000,gid=1000 0 0

I have a file with the smb un/pw in there instead of putting it into fstab directly

Hadlock
Nov 9, 2004

This showed up in my news feed today. $157 for the base with 12gb ram model which doesn't come with an HDMI port, but you can get the HDMI for a few bucks more

https://www.cnx-software.com/2023/05/17/pocket-sized-2-8-inch-mini-pc-features-an-intel-n100-processor-12gb-ram-up-to-2tb-storage/



Spec sheet says it's about 2.8x2.8x1.8"

tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe
Wow that’s a real awesome thing!

Searching Amazon for zx01 led me to this

Beelink Mini S Mini Pc Intel Jasper Lake Processor N5095 (up to 2.9GHz) 8GB DDR4 128GB SSD 4C/4T, 4M Cache, Windows11 Pro, 4K Dual Display, Auto Power On … https://a.co/d/dXXMcnb

At like $200CAD. Feeling kind of dumb about my 6th gen Intel hp pro desk that was $400 in 2020

Retrograde
Jan 22, 2007

Strange game-- the only winning move is not to play.

Mantle posted:

https://beepberry.sqfmi.com/

Just ordered one of these, looks like a great portable chat terminal.

This looks awesome, I finally got a pi zero w on the way and this thing looks awesome to take when I'm away from home and not have to drag a laptop or using an on screen keyboard on my phone to ssh into things. Thanks for posting it!

Dicty Bojangles
Apr 14, 2001

I wound up ordering the beepberry, too, for the same reasons… especially noodling some ssh and watching irc. I hope they eventually sell some cases like they do for their Watchy.

Mantle
May 15, 2004

What really made me want the beepberry is that they sourced blackberry keyboards for it. I never used one before, but I figure they've gotta be a better user experience than any other home made design. Also, as the pi0 improves over time, this should be a forward compatible drop in upgrade so it's a good candidate for a "forever" computer. I'm tired of throwing electronics away.

Death of Prime
Nov 3, 2005

Dead...for now

sb hermit posted:

Sorry, it's just that a lot of stuff seems a bit confusing.

For this listing:

it looks like /mnt/share was mounted with //192.168.1.247/volume1

However, it didn't show the full permissions and ownership (like with pi4@raspberrypi:/mnt $ cd share
-bash: cd: share: Permission denied

Do you mind getting another screenshot? Also, can you look into the "Shared Videos" directory as root, or change permissions?

Also, for this listing:

was /mnt/share mounted as //192.168.1.247/volume1/'Shared Videos' ?

I just want to make sure because it helps with the mental model I'm building of how your setup is laid out and would really help to address an inconsistency

EDIT: fixed a share name

I'm doing this remote and can't grab screen shots but here are the results


The command I used to mount
sudo mount -t nfs4 -o proto=tcp,port=2049 192.168.1.247:/volume1/'Share Videos' /mnt/share

When I try and cd to the directory /mnt/share I get the below error
pi4@raspberrypi:/mnt $ cd share
-bash: cd: share: Permission denied

ls-I command give me this
pi4@raspberrypi:/mnt $ ls -l
total 4
d--------- 1 root root 62 Apr 16 17:52 share
drwxr-xr-x 2 root root 4096 May 18 17:51 share2

tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe

Death of Prime posted:

I'm doing this remote and can't grab screen shots but here are the results


The command I used to mount
sudo mount -t nfs4 -o proto=tcp,port=2049 192.168.1.247:/volume1/'Share Videos' /mnt/share

When I try and cd to the directory /mnt/share I get the below error
pi4@raspberrypi:/mnt $ cd share
-bash: cd: share: Permission denied

ls-I command give me this
pi4@raspberrypi:/mnt $ ls -l
total 4
d--------- 1 root root 62 Apr 16 17:52 share
drwxr-xr-x 2 root root 4096 May 18 17:51 share2

What do you get with your ls -l when you add a umask?
code:
sudo mount -t nfs4 -o proto=tcp,port=2049,umask=002 192.168.1.247:/volume1/'Share Videos' /mnt/share
If that’s no good, op, you need to change your nfs settings from this post

Death of Prime posted:

The username and password are what I use to log into the snyology. I have a username and pw for the pi but they are different than the NAS




To squash all to root and try that out.

tuyop fucked around with this message at 21:58 on May 21, 2023

sb hermit
Dec 13, 2016





Death of Prime posted:

I'm doing this remote and can't grab screen shots but here are the results


The command I used to mount
sudo mount -t nfs4 -o proto=tcp,port=2049 192.168.1.247:/volume1/'Share Videos' /mnt/share

When I try and cd to the directory /mnt/share I get the below error
pi4@raspberrypi:/mnt $ cd share
-bash: cd: share: Permission denied

ls-I command give me this
pi4@raspberrypi:/mnt $ ls -l
total 4
d--------- 1 root root 62 Apr 16 17:52 share
drwxr-xr-x 2 root root 4096 May 18 17:51 share2

Thanks! NFS is different than CIFS. If you've used NFS with your other clients, then this would be a good start. But if you used CIFS or SMB, it may be worth using that instead. Just a heads up.

Anyways, we can keep using NFS for now. The security won't be great but it can be a start. First, you will want to go into the synology nfs settings and set squash to "no mapping". If it does what I think it does, then this will allow root to access your files. I pulled the UI information from here:

https://kb.synology.com/en-ph/DSM/help/DSM/AdminCenter/file_share_privilege_nfs?version=7

Next, you can try mounting again and see if things look a bit better:

code:
sudo mount -t nfs4 -o proto=tcp,port=2049,no_root_squash 192.168.1.247:/volume1/'Share Videos' /mnt/share
However, if this doesn't work, then please do the following:

code:
sudo mount -t nfs4 -o proto=tcp,port=2049,no_root_squash 192.168.1.247:/volume1 /mnt/share

sudo ls -lAd /mnt/share/'Shared Videos'
This will let us know who owns that directory and what its permissions are.

As you know, NFS doesn't use usernames and passwords (modern NFS uses kerberos for user authentication, security, and mapping which is a five thousand word post on its own) so buckle up for some more debugging.

sb hermit
Dec 13, 2016





tuyop posted:

What do you get with your ls -l when you add a umask?
code:
sudo mount -t nfs4 -o proto=tcp,port=2049,umask=002 192.168.1.247:/volume1/'Share Videos' /mnt/share
If that’s no good, op, you need to change your nfs settings from this post

To squash all to root and try that out.

ah, you beat me to it

yeah, disabling root squash on the server (which is the synology in this case) should really help things.

adding the umask could help as well

Warbird
May 23, 2012

America's Favorite Dumbass

So just to be clear on my end, and I really ought to know this, SMB is the recommended “networked file drive” solution for Linux stuff correct? NFS is mainly for windows iirc, though it does SMB fine too.

E - googled and I have that backwards.

sb hermit
Dec 13, 2016





it depends on what you're doing and what your resources are

if your systems and resources are already configured for nfs and you have the infrastructure for it, it's good, particularly for servers that talk to each other (like for storing databases, or whatnot)

if you have older unix systems, then it's still good

if you want to run virtual machines and store the disk images over NFS, it's a well supported use case

anytime you have unix systems talking to unix systems (or linux talking to linux), the test cases and scenarios will assume NFS

but it can be a big learning curve. NFSv4, in particular, has a lot of pitfalls and changes that NFSv3 and earlier did not.

On the other hand, SMB and CIFS are great if you have a lot of end user clients (desktops, tablets, laptops, etc) talking to a file server. Even modern Macintoshes will use CIFS for Time Machine (in the past, they supported AFP and AppleTalk only, which was mac specific). If you have a network with actual real users on desktops, you should use CIFS to have them talk to the file server. If you have servers talking to each other or to dedicated SANs, then the use case for NFS is bigger. It all depends on your requirements.

sb hermit
Dec 13, 2016





in general, SMB and CIFS are interchangeable but CIFS is the modern term and SMB is the older term.

Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.

sb hermit posted:

in general, SMB and CIFS are interchangeable but CIFS is the modern term and SMB is the older term.

Actually, CIFS is sort of the newer term, but it's also obsolete and SMB is the current term. CIFS was a rebranding of SMB 1.0 that Microsoft tried to standardize, but it wasn't meant to be and the later branding became SMB 2.0 and 3.0.

My own opinion is that you shouldn't try to mix Linux and SMB. My group administers close to 900 servers and the ones that operate as SMB clients are absolutely the most unreliable ones. If my coworker bangs his head against the wall long enough he can make them run decentish, then Microsoft releases some new security update and here we go again.

If I need Linux and SMB, I'd probably install Windows Server and turn it into Linux with WSL.

Computer viking
May 30, 2011
Now with less breakage.

SMB on linux seems to work best with temporary userland mounts, and even then you run into annoying things like gvfs mounting to some horrible path with brackets and commas that confuses a lot of tools.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

If it's Linux taking to Linux, I would just start with a SFTP / SSHFS mount (zero setup beyond enabling SSH, which you probably have already) and see if the performance is acceptable before looking at other protocols.

Death of Prime
Nov 3, 2005

Dead...for now

tuyop posted:

What do you get with your ls -l when you add a umask?
code:
sudo mount -t nfs4 -o proto=tcp,port=2049,umask=002 192.168.1.247:/volume1/'Share Videos' /mnt/share
If that’s no good, op, you need to change your nfs settings from this post

To squash all to root and try that out.

I get this error with the new mnt command


I also changed the mapping

sb hermit
Dec 13, 2016





Death of Prime posted:

I get this error with the new mnt command


I also changed the mapping


If you don't mind, can you try again with your old mnt command?

Disabling squash mapping should hopefully fix more access configuration issues.

If you still encounter issues, and "sudo chmod 755 /mnt/share" doesn't work, then please try this:

code:
sudo mount -t nfs4 -o proto=tcp,port=2049,no_root_squash 192.168.1.247:/volume1 /mnt/share

sudo ls -lAd /mnt/share/'Shared Videos'

sudo ls /mnt/share/'Shared Videos'
If this still doesn't work then we may have to try using a lower nfs version number or seeing if some synology web ui option was overlooked.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

sb hermit posted:

it depends on what you're doing and what your resources are

if your systems and resources are already configured for nfs and you have the infrastructure for it, it's good, particularly for servers that talk to each other (like for storing databases, or whatnot)

Running a database over NFS sounds like a great way to lose data, slowly.

sb hermit
Dec 13, 2016





Subjunctive posted:

Running a database over NFS sounds like a great way to lose data, slowly.

well yeah

https://www.postgresql.org/docs/9.0/creating-cluster.html

YerDa Zabam
Aug 13, 2016



Looks like stock is still improving, like the raspberry pi man has been saying in interviews recently. I was sceptical initially as it was first mentioned at the start of the year, and nothing much seemed to change.
Zeros and 3As seem to be staying in stock ok, and even the 4s last more than a few hours now. CM4s and even the odd CM3s have appeared.
I got a zero to make a pseudo scsi thing for and old Akai sampler so that's cool. Use sd cards for 8 "hdd devices" rather than spend hundreds on one 30 year old 500mb hard drive. Good stuff.

Oh yeah, the raspberry guy has got the poshest English accent ever. Really hard to follow him, even as a brit who's heard plenty of posh English fuckers (usually barking orders and being entitled, though he seems to be a good egg)

Thanks Ants
May 21, 2004

#essereFerrari


If the next Pi throws a couple of the USB ports away in exchange for an additional GigE port (or hey, push the boat out and go 2.5Gb) that isn't sat on the USB bus then I'll buy about a hundred of them. Come on Pi people, do something good.

Adbot
ADBOT LOVES YOU

xzzy
Mar 5, 2009

Actual usb 3 speeds would be a game changer for me too. And lose the garbage micro hdmi please.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply