Permission Setting / Unable to Execute Binary Under RClone Google Drive Mount

What is the problem you are having with rclone?

Newly created files under Google Drive rclone mount aren't executable. I have my service set up with --umask 0007 and the permissions are as expected, but if I create a new file somewhere under the mounted drive, permissions don't apply and I am unable to chmod the file so I can execute it.

Run the command 'rclone version' and share the full output of the command.

- os/version: debian 12.6 (64 bit)
- os/kernel: 6.1.0-23-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.1
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

./example

Please run 'rclone config redacted' and share the full output. If you get

[GoogleDrive]
type = drive
scope = drive
token = XXX
team_drive = XXX
root_folder_id = 

[OneDrive]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal
### Double check the config for sensitive info before posting publicly

My systemd service:

[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/b3at/.config/rclone/rclone.conf
RestartSec=10
ExecStart=/usr/bin/rclone mount GoogleDrive: /mnt/gdrive \
   --allow-other \
   --umask 0007 \
   --syslog \
   --poll-interval 10s \
   --cache-dir=/mnt/rclonecachegdrive \
   --vfs-cache-mode full \
   --volname gdrive \
   --vfs-cache-max-size 60G \
   --vfs-read-chunk-size 128M \
   --vfs-read-ahead 2G \
   --vfs-cache-max-age 5000h \
   --bwlimit-file=100M

ExecStop=/bin/fusermount -uz /mnt/gdrive
Restart=on-failure
User=b3at
Group=b3at

[Install]
WantedBy=multi-user.target

example:

if I do ls -l under /mnt/gdrive, all folders have drwxrwx--- however, touch test and ls -l test returns -rw-rw----, I can't execute test, even with chmod. This is problematic since I would like to compile and execute binaries inside of the mount

welcome to the forum,

check my post about that.

Hi,

I have already seen your post. I have --umask 0007 which serves a similar purpose to --file-perms and it works. The issue is that these permissions aren't applied if I try to create a new file, for example by compiling code.

Do you suggest removing umask and adding --file-perms?

FYI - as this is something new for me too I just tested on macOS. --file-perms does the trick for new files too.

I have to read more @asdffdsa wiki stuff:) Some real cool solutions there.

1 Like

Awesome! This worked. I didn't know that --umask would only cover existing files but I'm happy this does the job.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.