I'm trying to write contents to my shared folders on my Raspberry Pi over AFP.
However I keep getting the same error/warning regarding permissions and locked volume:
I'm fairly sure permissions are right, I'm logged and as the default pi user and used chown -R pi /mnt/seagate
on the pi to own my HDD mount for the pi user.
This didn't work so I tried setting permissions for my /var/www folder with chmod -R 777 /var/www
, resulting in the same error pictured above.
Checking the permissions in the Finder for the home folder (which should be no issue, being logged in as the pi user) I see that everyone has RW permissions.
I think the issue isn't my pi's fault (hence why I posted this here and not on raspberrypi). I think there must be something wrong with my AFP configuration on my Mac (also note that I used this method of sharing folders from pi with AFP to mac before and it always worked before).
I attached a screenshot of my afp configuration below since I have no clue what could be wrong. If needed to help, I can also provide the configurations for netatalk (afp protocol on the pi).
Best Answer
Probably some permissions and/or the settings are set wrong on your Raspberry. I suspect the external drive or a shared folder on the external drive to have wrong permissions set. Compare that with the your home folder on the Raspberry where you probably have full r/w access.
Please try this as a first step. You may apply special settings/configs later. Below i assume that your external disk is sdb and contains one ext4 volume sdb1 with the name seagate. The volume/partition itself should not be owned by pi but by root!
First stop netatalk with:
Unmount your external volume after checking the the mounted volumes with
df
orcat /proc/mounts
to get the identifier of your external disk:First we have to fix your mount point:
The following permissions should apply (check this with
ls -la
on the Raspberry):For /mnt
Check that the folder /mnt contains a folder seagate with
ls -la
:Add the folder if necessary with
sudo mkdir /mnt/seagate
and change permissions and ownership accordingly with chown and chmod.Get the UUID of all volumes with
sudo blkid
. You should get a similar output like that one:sda1 and sda5 are your internal main and swap partition. sdb1 is the first volume on your external disk.
Check with
sudo nano /etc/fstab
if your fstab file mounts the volume of the external disk at /mnt/seagate. Replace the UUIDs below with those found in your setup.Remount sdb1 with
sudo mount /dev/sdb1
and check the mountpoint withdf
. It should look like this:Now create a base folder for the user pi:
Move all your personal folders to pi with:
Example:
Then apply ownership recursively with
Reapply ownership and permissions of /mnt/seagate/lost+found with
Now you have to check netatalk and fix it if necessary:
Locate the following startup options and change them as noted below in /etc/default/netatalk with
sudo nano /etc/default/netatalk
:Go to the end of the file /etc/netatalk/afpd.conf. It should look similar to this:
Now configure the shared volumes in /etc/netatalk/AppleVolumes.default near the end of the file:
The first is the directory to share, the second is the name visible in the "Connect to Server" -> "Volumes to select" window and later on your desktop and the third is/are the allowed user(s).
Restart netatalk with:
Try to connect to the share(s) with your Mac OS X 10.10 client by entering: "afp://ip-address" in 'Go to...' -> 'Connect to Server'.