Can someone please help

Allow non-root users to specify the allow_other or allow_root mount options.
user_allow_other
root@vmi176708:~# ps -ef | grep rclone
root 1860 1 0 18:43 ?
/usr/bin/rclone mount gmedia: /media/Plex --allow-other --dir-cache-time=160h --cache-chunk-size=10M --cache-inf o-age=168h --cache-workers=5 --cache-tmp-upload-path /data/rclone_upload --cache -tmp-wait-time 60m --buffer-size 0M --attr-timeout=1s --syslog --umask 002 --rc --log-level INFO
root 3058 2098 0 19:25 pts/1 00:00:00 grep --color=auto rclone

What is the output if you type in:

ls -alR /data/rclone_upload

plexuser@vmi176708:~$ ls -alR /data/rclone_upload
/data/rclone_upload:
total 8
drwxr-xr-x 2 root root 4096 Apr 21 11:20 .
drwxr-xr-x 3 root root 4096 Apr 21 11:20 …
plexuser@vmi176708:~$

and this from the root access

root@vmi176708:~# ls -alR /data/rclone_upload
/data/rclone_upload:
total 8
drwxr-xr-x 2 root root 4096 Apr 21 11:20 .
drwxr-xr-x 3 root root 4096 Apr 21 11:20 …
root@vmi176708:~#

And you ran a cp somefile into /media/Plex/ ? What specifically did you type?

Did you check your syslog and see if any error messages are present?

this was my command line

cp /home/plexuser/Downloads/Taken.2.2012.mkv /media/plex

i have checked the htop it was showing the transfer as a white color not a green. when i was uploading my media before i have to stop the mount and the htop was showing green for my transfer files. but when i use the command cp /home/plexuser/Downloads/Taken.2.2012.mkv /media/plex the htop not showing any transfer files

If you type in a cp command, it should take some time (depending on server and the size of the file) to copy the file from the source to the destination and a prompt should return back to you.

can you tell me what this path /data/rclone_upload its mentioned in the mount command line ( --cache-tmp-upload-path /data/rclone_upload --cache ) ? as i have found already a folder with the same name. maybe i need to change that line to my path which is media/plex

That’s basically a temporary file location before its uploaded to the remote. The amount of time it stays in the temporary location is controlled by –cache-tmp-wait-time.

Can you provide the output of ls -alR /media/plex?

this the output

root@vmi176708:~# ls -alR /media/plex
-rw-r–r-- 1 root root 18953627829 Apr 21 21:18 /media/plex

thanks guys i really appreciated you help. all is working fine now the mount and the cp command.

Hi Animosity022,

Could you please check the below mount. sorry i always disturb you

[Unit]
Description=Mount and cache Google drive to /gmedia
After=syslog.target local-fs.target network.target
[Service]
Type=simple
User=root
ExecStartPre=/usr/bin/rclone mount gmedia: /gmedia --allow-other --dir-cache-time=160h --cache-chunk-size=10M --cache-info-age=168h --cache-workers=5 --cache-tmp-upload-path /data/rclone_upload --cache-tmp-wait-time 60m --buffer-size 0M$
ExecStart=/usr/bin/rclone mount gmedia: /gmedia
–config /home/alora/.config/rclone/rclone.conf
–allow-other
–cache-info-age 8h
–cache-writes
GdriveCache: /gmedia
ExecStop=/bin/fusermount -u -z /gmedia
ExecStop=/bin/rmdir /gmedia
Restart=always
[Install]
WantedBy=multi-user.target

Why are there two mount lines, for ExecStartPre & Exec Start? Combine them into one for ExecStart. The 2 ExecStop lines are also wrong. rmdir should not be required.

so it has to be like this?

[Unit]
Description=Mount and cache Google drive to /gmedia
After=syslog.target local-fs.target network.target
[Service]
Type=simple
User=root
ExecStar=/usr/bin/rclone mount gmedia: /gmedia --allow-other --dir-cache-time=160h --cache-chunk-size=10M --cache-info-age=168h --cache-workers=5 --cache-tmp-upload-path /data/rclone_upload --cache-tmp-wait-time 60m --buffer-size 0M$
–config /home/alora/.config/rclone/rclone.conf
–allow-other
–cache-info-age 8h
–cache-writes
GdriveCache: /gmedia

Cleaned up some duplicate arguments:

/usr/bin/rclone mount gmedia: /gmedia \
--config /home/alora/.config/rclone/rclone.conf \
--allow-other \
--dir-cache-time=160h \
--cache-chunk-size=10M \
--cache-info-age=168h \
--cache-workers=5 \
--cache-tmp-upload-path /data/rclone_upload \
--cache-tmp-wait-time 60m \
--buffer-size 0M

Also, add back the ExecStop line containing the fusermount command.

like this

/usr/bin/rclone mount gmedia: /gmedia
–config /home/alora/.config/rclone/rclone.conf
–allow-other
–dir-cache-time=160h
–cache-chunk-size=10M
–cache-info-age=168h
–cache-workers=5
–cache-tmp-upload-path /data/rclone_upload
–cache-tmp-wait-time 60m
–buffer-size 0M
ExecStop=/bin/fusermount -u -z /gmedia

Looks good. But is this supposed to be a service file or a script?

If it is a service file, as I suspect, then bring back everything from your original post and do the following:

  1. Remove ExecStartPre
  2. Replace ExecStart with the specified command
  3. Replace the 2 ExecStop with the fusermount ExecStop.

Hi darthShadow,

can you please check the service script

[Unit]
Description=rcloneMountgmedia
AssertPathIsDirectory=/gmedia
After=syslog.target local-fs.target network.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/rclone mount gmedia: /gmedia
–config /root/.config/rclone/rclone.conf
–allow-other
----dir-cache-time=160h
----cache-chunk-size=10M
–cache-info-age=168h
–cache-workers=5
–cache-tmp-upload-path /data/rclone_upload
–cache-tmp-wait-time 60m
–buffer-size 0M
–attr-timeout=1s
–syslog
–umask 002
–rc
–log-level INFO
ExecStop=/bin/fusermount -uz /gmedia
Restart=Restart=on-abort
[Install]
WantedBy=multi-user.target

or i can go with the below

[Unit]
Description=rcloneMountgmedia
AssertPathIsDirectory=/gmedia
After=syslog.target local-fs.target network.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/rclone mount gmedia: /gmedia --allow-other --dir-cache-time=160h --cache-chunk-size=10M --cache-info-age=168h --cache-workers=5 --cache-tmp-upload-p$
ExecStop=/bin/fusermount -uz /gmedia
Restart=Restart=on-abort
[Install]
WantedBy=multi-user.target