So I just discovered that the folder permissions in my cloud folders are wonky because of various transfers I did over time. I moved over to filebot (which runs as user kamos) for automation of moving files. I got it setup fine but it started giving me file access - permission denied errors. I had a look at the folders and noticed that some folders are owned by root and some by kamos: https://hastebin.com/mikomonoqi.hs
How do I fix this? I feel like the simplest solution should be
sudo chown -R kamos:kamos ~/cloud/ but with cloud stuff I find it’s never that simple.
Also, is there a way to get rclone to keep the file permissions on upload (copy or move)?
I believe i’m having the same issues as you with weird permissions
I’m sorry i’m not able to add anything to fixing it yet
but i’ll come back and post as i find things out.
so far mounting the drive without --read-only and running chown/chmod doesn’t seem to be working
my synology sync somehow added files owned by root and they can’t be read
Thanks for reporting this. I still don’t have a solution for this. If you do find something, please post it here.
are you using unionfs here? it looks like only the files in the RW cache of unionfs are having the correct permissions.
could you state how you mounted those by command?
I do use unionfs but the output is that of the mount itself
ls -all /home/kamos/media. This is the mount command:
/usr/bin/rclone mount \
--acd-templink-threshold 0 \
--stats 10s \
--buffer-size 1G \
media: /home/kamos/media &
I run mine as root and I set the uid, gid, mask on the mount parameters.
Permissions are not uploaded.
then run rclone mount and unionfs, encfs as kamos. no need to be root
like @calisro said, set uid,gid and mask (probably the better solution)
This is mine incase you decide you want to just do it as root.
uid=$(id -u $USER)
gid=$(getent group $GROUP | cut -d: -f 3)
/usr/sbin/rclone -v --log-file /data/log/camc-gs.log \
mount robgs:cams/ /data/cams \
--max-read-ahead 1024k \
--gid $gid --uid $uid \
--umask $UMASK &
mountpoint -q $GS_RCLONE
I run the mount script as kamos @reboot. Should I still need to set the uid, gid, mask on the mount parameters?
you shouldn’t need the parameters if you are running as kamos. btw, you’ll then need to run BOTH the unionfs and the rclone mount as kamos.
Where are the files within the unionfs located that are set as ‘root’ owned? Are they on the RW local file system? Or the ‘media:’ remote?
The media: remote. I mount both as kamos.