Couchpotato permission errors when renaming

Host should be *. That allows any host to connect. (public) Unless you want a specific host to be the one doing the connecting over NFS. (then put its IP there.)

You DO want write access, otherwise files cannot be created or edited on the share.

The syntax for mounting an NFS mount is more in line with what you quoted prior–

192.168.1.100:/nfs/nameofshare* /mnt/nameofshare* nfs username=administrator,password=pass atime,auto,rw,dev,exec,suid 0 0

Note it is
[server]:/[share]
not
//[server]/[share]
like with cifs.

Aaaaaahhh noted! Let me try this and let you know what happens!

RE-reading your query, the (*) on the end of the share is something to be omitted. The source you got them from used them to draw attention, nothing else. Having them on will likely prevent it from mounting properly.

Also, Username and password options are not strictly necessary, unless you have a specific need to have your user credentials be something other than what they are on the connecting unix-like system. (That is one of the benefits of using NFS after all, you get REAL, and PROPER permissions enforcement.)

Ok so i should remove the password i had set on the folder as it isn’t necessary?

Oh and another thing, should i be using fstab? Or a sudo command? Because so far no luck… The initial mount i used that path which mounted the drive.

NFS uses a combination of “allowed hosts”, and native unix permissions to determine who has access to what.

EG, you can say “Only the computer with the address 192.168.1.50 can connect to this share” by setting that in the host section of the dashboard. (on real unix/linux hosts, this is controlled by the file /etc/exports)

Now, many users can be active on that host. The host can mount the share, but how do you keep UserA from smashing UserB’s data, and vise versa? The answer, is “The same way you do that in the local file system.” eg, with native file system permissions. The connecting device enforces the permissions the same way it enforces them on the local disk.

So, when attaching to an NFS share, the username and password options are irrelevant. That part is controlled by they allowed host list (/etc/exports). Once attached, who gets to see what files, and do what with them, is controlled by the permissions on those files and folders. The system requires local authentication to use a user’s credentials, so since the user is already logged in, asking for credentials is redundant.

It is only there in case you NEED all files and folders created to be made specifically under a specific identity. (EG, this host is super trusted, and does backups or something-- and all ownership will always be for a root user, etc- no matter what local user is logged in at the console. This is not (or should not be) the case with your rPi-- you will get security benefits from having local users and groups for various daemons running. Passing a username and password with /etc/fstab at boot is not advisable in this use case.

EDIT:

I did not give a use-case specific fstab entry-- just a generic prototype that you had quoted earlier, just to point out that it was more syntax correct than the entry you were using, which was clearly for a CIFS mount. You will need to make it use-case specific yourself.

Thanks Wierd,

I’m learning, i guess slowly but surely, i’m no tech guy i’m just learning along the way. Let me show you the mount path i used which worked in fstab. I was able to see the drive in pi when I (ls) however I had the permission issues in couchpotato. I got the below path from a tutorial to mount NAS in fstab i just changed up server, share etc.

//192.168.11.80/pbfcloud /home/osmc/wdmycloud cifs username=pbfcloud,password=boss1,noauto,x-systemd.automount,uid=1000,gid=1000,iocharset=utf8 0 0

With that info, your fstab should say this

192.168.11.80:/nfs/pbfcloud /home/osmc/wdmycloud nfs atime,noauto,rw,dev,exec,suid 0 0

Cries! Wierd…

Now look at this… I created the new Movie, TV and Download folder by SSH into the NAS when i check the permissions as I said earlier it was 777 giving full permissions which was what I wanted. Now it just came to me that when i created this unless the path is mounted on the Rpi when I mkdir wdmycloud, the directories created wouldn’t be in that folder!

So I guess what I should be trying to do is mount the path from the NAS to the Rpi is this possible? my path looks like this when i checked the NAS… /mnt/HD/HD_a2/mediacenter. Any suggestions on how to do this?

Create a share called “mediacenter” in the dashboard, and enable nfs on it. then change the fstab to look like this.

192.168.11.80:/nfs/mediacenter /home/osmc/wdmycloud nfs atime,noauto,rw,dev,exec,suid 0 0

On the MyCloud, the system creates symbolic links in the /nfs/ folder that point to locations on the internal hdd, which as you noted, is mounted at /mnt/HD/HDa_2 .

So, if you followed those symlinks, you see this:

/nfs/mediacenter → /mnt/HD/HDa_2/mediacenter

It does this so that it can give a different owner and group for the share, so it does not conflict with Samba’s requirements. Samba shares get symlinks simmilarly, but they go under /shares instead.

When you create a share on the MyCloud, it creates a folder in /mnt/HD/HDa_2, and makes the corresponding symbolic links that point there in /shares (and /nfs, if nfs is enabled). If the folder already exists, it just creates the symbolic links, and sets up the sharing system.

Hey,

I’m out of ideas… #Cries… Lol… I ran a df. .tell me if you see anything out the ordinay
osmc@OSMCmedia:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 370520 0 370520 0% /dev
tmpfs 375512 5172 370340 2% /run
/dev/mmcblk0p2 7282056 1146204 5742892 17% /
tmpfs 375512 0 375512 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 375512 0 375512 0% /sys/fs/cgroup
//192.168.11.80/pbfcloud 2875890344 29237448 2846652896 2% /home/osmc/wdmycloud
/dev/mmcblk0p1 244988 21006 223982 9% /boot
/dev/sda1 976759804 891321872 85437932 92% /media/KODI MEDIA
tmpfs 75104 0 75104 0% /run/user/1000

You cannot have both NFS and CIFS mounted at the same place!!

Do a mount without any options. It will tell you what filesystem is mounted. I will bet money that /home/osmc/wdmycloud is mounted with CIFS, given how that df string is structured.

Hahaha money i’m sure you will win… But look at it this way, NFS not mounted based on the df… Please note I have the external HDD connected to the RPi…

/dev/sda1 976759804 891321872 85437932 92% /media/KODI MEDIA
tmpfs 75104 0 75104 0% /run/user/1000

I was referring to this little gem. that is a CIFS style mount, given the line. For reference, this is what an nfs style mount looks like from df…

192.168.0.2:/nfs/Public 3837304384 468721024 3329580864 13% /home/chromebook/NAS

and this is what it looks like from mount, with no options.

192.168.0.2:/nfs/Public on /home/chromebook/NAS type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.2,mountvers=3,mountport=43320,mountproto=udp,local_lock=none,addr=192.168.0.2)

I would wager that you are still having problems because you are still mounting as CIFS.

Well maybe that’s it, because I originally had the cifs mount in fstab… This was my very first fstab entry with cifs…

//192.168.11.80/pbfcloud /home/osmc/wdmycloud cifs username=pbfcloud,password=boss1,noauto,x-systemd.automount,uid=1000,gid=1000,iocharset=utf8 0 0

What do you suggest now to get this fixed?

192.168.11.80:/nfs/pbfcloud /home/osmc/wdmycloud nfs rw,noauto,exec,suid,relatime,x-systemd.automount 0 0 

instead of

//192.168.11.80/pbfcloud /home/osmc/wdmycloud cifs username=pbfcloud,password=boss1,noauto,x-systemd.automount,uid=1000,gid=1000,iocharset=utf8 0 0

in /etc/fstab, then reboot.
It should work after that.

It will mount to exactly the same place, just with NFS instead of CIFS. No need to pass any usernames, passwords, or charactersets. That is not how NFS does authentication. That should mount the share at /home/osmc/wdmycloud, and give you native unix permissions. You should be able to change permissions with the GUI even, if you have the fs permissions to do so. (root certainly does.)

the x-systemd.automount option tells systemd to make sure that all the needed stuff (network stack, et al) are up before attempting the mount.

Hey Wierd,

Look at the below and tell me what you think;

osmc@PBFmedia:~$ mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=370520k,nr_inodes=92630,mode=75 5)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
/dev/mmcblk0p2 on / type ext4 (rw,relatime,stripe=1024,data=ordered)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmod e=000)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xa ttr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatim e,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blki o)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,mem ory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,de vices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,fr eezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,ne t_cls)
systemd-1 on /home/osmc/wdmycloud type autofs (rw,relatime,fd=21,pgrp=1,timeout= 300,minproto=5,maxproto=5,direct)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,time out=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
systemd-1 on /boot type autofs (rw,relatime,fd=34,pgrp=1,timeout=300,minproto=5, maxproto=5,direct)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sda1 on /media/KODI MEDIA type fuseblk (rw,nosuid,nodev,relatime,user_id=0, group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437 ,iocharset=ascii,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=75104k,mode=70 0,uid=1000,gid=1000)

So here’s the situation, when i used the path you gave me in fstab;

192.168.11.80:/nfs/pbfcloud /home/osmc/wdmycloud nfs rw,noauto,exec,suid,relatime,x-systemd.automount 0 0

When I try to run a df at in Putty, it just hangs up.

Try this

192.168.11.80:/nfs/pbfcloud /home/osmc/wdmycloud nfs rw,noauto,exec,suid,intr,relatime,x-systemd.automount 0 0

or this

192.168.11.80:/nfs/pbfcloud /home/osmc/wdmycloud nfs rw,noauto,exec,suid,soft,relatime,x-systemd.automount 0 0

You might have weak network connectivity. NFS wants to default to ‘hard’ mode mounts, which require a very reliable communication with the NFS server. Putting it in Soft or Intr (interruptable) mode can help with that when the medium is less reliable. (like wifi is.)

Ok let me try both and then report… Brb