Commands don't have permission when using absplute path
Posted
by
Markos
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Markos
Published on 2013-10-28T09:38:24Z
Indexed on
2013/10/28
10:01 UTC
Read the original article
Hit count: 263
permissions
I have folders set up this way:
/srv/samba/video
getfacl /srv/samba/video
# file: srv/samba/video
# owner: root
# group: nogroup
user::rwx
group::---
group:sambaclients:rwx
group:deluge:rwx
mask::rwx
other::---
default:user::rwx
default:group::---
default:group:sambaclients:rwx
default:group:deluge:rwx
default:mask::rwx
default:other::---
That means, user deluge has rwx to folder /srv/samba/video.
However, when running command as user deluge, I am getting weird permission errors.
When in folder /srv/samba/video:
sudo -u deluge mkdir foo
works flawlessly.
But when using absolute path:
sudo -u deluge mkdir /srv/samba/video/foo
I am getting permission denied.
When running sudo -u deluge id
, I get output
uid=113(deluge) gid=124(deluge) skupiny=124(deluge)
which shows that user deluge is indeed in group deluge. Also, the behavior was the same when I gave the permissions also to user deluge not just group deluge. When executing as non-system user, it does work.
The reason that I want to use absolute paths is that I am using automatically triggered post-download script which extracts some files into the folder.
I have spent way too many hours to solve this problem myself.
mkdir
isn't the only command that fails, touch
is doing the same thing, so I suspect that it's not mkdir
's fault.
If you need more info, I will try to put it in here, just ask. Thanx in advance.
© Ask Ubuntu or respective owner