I have a network drive with a brtfs filesystem (Synology NAS) that I have configured to automount via the fstab. If I want to transfer files to it from EndeavourOS (ext4), I have to open the drive’s folder as administrator and enter my root password, which isn’t a big deal. I usually transfer large files onto it that take an hour or more to complete. During any of these file transfers, I will get prompted to enter the root password every five minutes or so until the operation is complete. If I’m not present at my computer, the file transfer will just pause until I come back and enter my password. I’ve tried to search the web and forums for a solution but I haven’t found anything at all. Do I just have to live with this or is there anything I can do?
Can you share the fstab entry you are using to mount the network drive?
Noob here so no idea if these are suitable for you or even valid:
You can set up sudo to not require a password for specific commands, and you can build a specific command to move all contents of a specific folder to another specific folder. Sudoers, visudo, and NOPASSWD are keywords for your research.
Alternatively you can change the timeout period for sudo via “timestamp_timeout”, but apparently it maxes out at 99min. You could set it to 99min before you start your file transfer and then change it back when it’s done.
Sorry to say but the polkit property auth_admin_keep
is hardcoded for 5 minutes.
I guess you could download the source, patch, and build yourself.
But it seems a bit overkill for the needs.
It might make more sense to deal with this on the permissions level or similar - so that you dont need kio/polkit to do these things.
I’ve edited the post with the entry
Please dont post pictures but text.
The picture you have posted shows
// /DS223j /DS223j cifs credentials=...
That seems wrong. What is the //
and the second /DS223j
doing?
A proper /etc/fstab entry should look like this
//SERVER/SHARE /mnt/MOUNTPOINT cifs credentials=...
What are the ownerships on mountpoint?
The first DS223j is the actual network drive that needs mounting, the second one is the directory in EndeavourOS that the drive will automatically mount in
When you want to transfer large files or folders from your PC to you NAS, why you do not use by example : filezilla ?
Free of charge, perfect for the job, easy to use. I also use freefilesync and it works fine.
Here my config BTW when using “freefilesync”
At what does the //
mean at the beginning of the line in your screenshot?
//**redacted**/DS223j ...etc...
There is a risk of system hang if the Synology isn’t reachable during boot when fstab entries are read & mounted.
There are other, safer methods available:
- http(s)
- rsync
- sshfs (restricted to authorized_keys)
- SyncThing (if syncing dirs)
smb://YOUR-SYNO/DS223j
in your file browser (Dolphin, Thunar, etc)- cifs-utils (see below)
You should at least use the _netdev
mount option to ensure the system waits for the network to be available before attempting to mount the share, as well as uid
& gid
so that the mounted files have the correct ownership.
“I have to open the drive’s folder as administrator and enter my root password”? That’s not been necessary in my experience with Synologys, perhaps a permission issue, are you mounting the Syno share in your local userhome (~/DS223j) or somewhere outside it that your don’t explicitly have permissions/ownership (/DS223j)?
cifs-utils
may be installed in your EnOS (if not, yay cifs-utils
), try mounting your share using this, first create the DS223j folder in your user home, replace the SYNO values with the relevant values, then paste into your terminal & hit enter:
sudo mount -t cifs -o username=SYNO_USERNAME,uid=SYNO_USERNAME,gid=SYNO_USERNAME //YOUR-SYNO/DS223j ~/DS223j/
The uid & gid options ensure that the mounted files have the correct ownership.
Also, using smb://
protocol in the address bar of your file browser should allow for access & storing credentials (temporarily or permanently), here’s a screenshot from Thunar:
The latter 2 methods both have the significant advantage of not storing your Syno credentials in plain text, which is pretty dope if you’re a credential or user of one.
//192.168.1.107/DS223j /DS223j cifs credentials=/home/esacrewol/.smbcredentials,x-systemd.automount 0 0
//smb share ip/folder i want to automount /folder in endeavouros with same name as the folder on the network drive
I have other entries for other drives as well and they all work perfectly fine. I just discovered that the mountpoint is owned by root. But if I go into the NAS directly instead of through the mountpoint folder then that is not the case.
Since you asked, I checked the mountpoint for my drive and it was indeed owned by root. It has always showed the actual drive (not root owned) and the mountpoint for it in network locations, so I thought maybe I don’t even need the fstab entry. I uncommented the entry in the fstab and rebooted and the drive is still available in my file manager without having to log back into it.
When I made the fstab entry initially, I had just accessed that drive from endeavouros for the first time so I didn’t consider that maybe it would just automatically be there after a reboot after providing credentials the first time. After all, I did have to create mountpoints for the other physical drives in my computer. Anyways, accessing the drive directly lets me do any file operations without needing to enter root password at all.
Problem solved
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.