[SOLVED] Member of Group is not allowed to write to folder

This forum is for discussion about general software issues.

[SOLVED] Member of Group is not allowed to write to folder

Postby hachel » Thu Jan 21, 2016 4:18 pm

Hi everyone,

I'm having the hardest time understanding file/folder-permissions. I have a raspberry-pi 2 with which I'm connected via ssh.
I installed the app BitTorrent-Sync, it has it's systemd service-file where I changed user and group from btsync:btsync to btsync:http (updated with daemon-reload). I have a folder on an external harddisk (mounted to /media/usb) called Backup. Backup has the following permissions:
$this->bbcode_second_pass_code('', '
ls -l /media/usb/
total 24
drwxrwx--- 5 alarm http 4096 Jan 21 14:00 Backup
')

When I start btsync it complains that it can't write to /media/usb/Backup. I also tried
$this->bbcode_second_pass_code('', '
sudo su -g http btsync -c "touch /media/usb/Backup/test"
')
which resulted in permission denied. I logged in and out with ssh and even rebooted the raspberry pi. I'm also very much able to write to any folder on that disk with the alarm user. The disk has an ext4 filesystem.
I thought that with the above permissions and group-ownership everyone in group http can do with that folder what it want.

Any help?

thanks

EDIT: I even added btsync to group http and it still didn't work, but I suppose that would have anyway only been necessary if I didn't explicitly state the group in the btsync.service-file?
Last edited by hachel on Thu Jan 21, 2016 8:29 pm, edited 1 time in total.
hachel
 
Posts: 26
Joined: Fri Mar 07, 2014 3:24 pm

Re: Member of Group is not allowed to write to folder

Postby WarheadsSE » Thu Jan 21, 2016 8:00 pm

can that user traverse the entire directory structure?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Member of Group is not allowed to write to folder

Postby hachel » Thu Jan 21, 2016 8:20 pm

hey, that was the problem. /media/usb belongs to a different user:group and had no +x flag for "other" (I just recently learned that +x also means being able to cd/read the directory, thought it only ment execute files).
Thanks, it works now.
hachel
 
Posts: 26
Joined: Fri Mar 07, 2014 3:24 pm


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests