Hi there,
After much help form the Devs I’ve almost completed my desired set up, just need to move some files from my Mac (on the same network) to my DietPi.
I’ve installed Samba server on the Pi and can mount the Pi HDD in Finder on the Mac. However when I go to copy files across from Mac to Pi I get a dialogue box asking me to Authenticate, but when I hit this button my Mac’s Finder says:
The operation can’t be completed because you don’t have permission to modify some items.
I"m sure it’s just a little adjustment that’s needed, but not sure what.
Any help gratefully received.
Massive thanks
Could you post the /etc/samba/smb.conf as well as the ls -la of the directories you are sharing?
Thanks for the reply and help.
When I enter the
/etc/samba/smb.conf
command I get Permission denied
When I enter
ls -la
I get the following:
total 40
drwx------ 7 root root 4096 Jul 2 12:19 .
drwxr-xr-x 21 root root 4096 Apr 21 22:58 ..
-rw------- 1 root root 2512 Jul 8 01:10 .bash_history
-rw-r--r-- 1 root root 570 Jan 31 2010 .bashrc
drwxr-xr-x 3 root root 4096 Jun 30 13:04 .cache
drwx------ 3 root root 4096 Jul 2 12:19 .config
drwxr-xr-x 3 root root 4096 Jun 30 21:17 .local
-rw-r--r-- 1 root root 148 Aug 17 2015 .profile
drwxr-xr-x 2 root root 4096 Mar 26 12:01 .ssh
drwxr-xr-x 2 root root 4096 Jun 30 20:55 Shows
I guess a misunderstanding. Pls share the content of the file. It’s a configuration file and nothing to be executed
cat /etc/samba/smb.conf
no, not a misunderstanding… me being totally out of my depth with Linux
I now need to work out how I navigate to/copy files within DietPi…
Simply run cat /etc/samba/smb.conf command and copy/past output from SSH terminal
Damn, you mods are good
Here’s what I get:
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog only = no
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
load printers = no
printcap name = /dev/null
disable spoolss = yes
[dietpi]
comment = DietPi Share
path = /mnt/dietpi_userdata
browseable = yes
create mask = 0664
directory mask = 0775
valid users = dietpi
writeable = yes
max connections = 8
root@DietPi:~#
Pls share ls -la /mnt/dietpi_userdata
This is what I get. Had meant to change USB HDD name to something more user friendly, but don’t think I can do that now that I’ve moved the User date there!
lrwxrwxrwx 1 root root 57 Jun 30 20:47 /mnt/dietpi_userdata → /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userda
ls -la /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata ?
TWHH
9 July 2021 08:06
11
root@DietPi:~# ls -la /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata
total 52
drwxrwxr-x 9 dietpi dietpi 4096 Jul 8 15:38 .
drwxr-xr-x 6 root root 4096 Jun 30 20:55 ..
-rw-rw-r-- 1 dietpi dietpi 10244 Jul 8 15:40 .DS_Store
-rw-rw-r-- 1 dietpi dietpi 4096 Jul 7 16:59 ._.DS_Store
drwxrwxr-x 2 dietpi dietpi 4096 Jun 30 13:11 Music
drwxrwxr-x 2 dietpi dietpi 4096 Jun 30 13:03 Pictures
drwxrwxr-x 2 dietpi dietpi 4096 Jun 30 13:03 Video
drwxrwxr-x 16 dietpi dietpi 4096 Jul 8 19:03 downloads
drwxr-xr-x 7 radarr dietpi 4096 Jul 9 08:51 radarr
drwxr-xr-x 13 sonarr dietpi 4096 Jul 9 09:05 sonarr
drwxr-xr-x 7 tautulli tautulli 4096 Jul 8 17:15 tautulli
ok which of these directories you like to edit or on what action your get the error message?
TWHH
9 July 2021 11:44
13
Thanks for your ongoing support.
I’ve been trying to drag and drop media files (in Finder via Samba) from my Max into either the Sonarr or Radarr directories on the Pi.
These are the directories that I don’t appear to have the correct permissions for.
Thanks again
yes, both folder have write permission for the user radarr/sonarr only. means, you are not able to write files as user dietpi, wich is used to connect via samba
drwxr-xr-x 7 radarr dietpi 4096 Jul 9 08:51 radarr
drwxr-xr-x 13 sonarr dietpi 4096 Jul 9 09:05 sonarr
Simply extent the folder permission to the user group
chmod 775 /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata/radarr
chmod 775 /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata/sonarr
TWHH
9 July 2021 13:29
15
Marvellous marvellous. Thank you so much. All now performing as desired.
Thanks again for your help… and patience
Consider using these commands:
chgrp -R dietpi /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata/radarr
chgrp -R dietpi /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata/sonarr
find /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata/radarr -type d -print0 | xargs -0 chmod 2775
find /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata/sonarr -type d -print0 | xargs -0 chmod 2775
find /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata/radarr -type f -print0 | xargs -0 chmod 664
find /mnt/2e716fb9-d183-4470-8d45-ac0ea80c7329/dietpi_userdata/sonarr -type f -print0 | xargs -0 chmod 664
They will recursively change the attributes of all files and folders already there to group writeable, as well as making the group the owner of the folder, rather than the user.
The commands provided by Joulinar have effect only on the first directory, so if you tried to access some folder deeper, it would give you the same error.
TWHH
9 July 2021 15:27
17
Thanks for the added info.
I won’t be going deeper - already massively out of my depth. Been a great learning curve though. Thanks for being on hand to throw me a lifejacket