[opensuse] mounting read only as root
Hello, I often have to use "rsync --delete" to mirror two very large archives usb disks. for safety reason, I would like to mount the source read only. usually I just mount disks in dolphin and use rsync from dolphin xterm. But like this disks are mounted rw is there a simple way to mount a disk ro as user? in Dolphin, the action seems to be done by kde-open5, but options do not show ro options] urls... Un outil en ligne de commandes pour les opérations réseau transparentes Options: -v, --version Displays version information. -h, --help Displays this help. --noninteractive Non-interactive use: no message boxes. If you don't want a graphical connection, use --platform offscreen --author Afficher les informations sur l'auteur. --license Afficher les informations sur la licence. --desktopfile <file name> The base file name of the desktop entry for this application. Arguments: url Fichier ou URL thanks jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
sorry Hello, I often have to use "rsync --delete" to mirror two very large archives usb disks. for safety reason, I would like to mount the source read only. usually I just mount disks in dolphin and use rsync from dolphin xterm. But like this disks are mounted rw is there a simple way to mount a disk ro as user? in Dolphin, the action seems to be done by kde-open5, but options do not show ro options] urls... Un outil en ligne de commandes pour les opérations réseau transparentes Options: -v, --version Displays version information. -h, --help Displays this help. --noninteractive Non-interactive use: no message boxes. If you don't want a graphical connection, use --platform offscreen --author Afficher les informations sur l'auteur. --license Afficher les informations sur la licence. --desktopfile <file name> The base file name of the desktop entry for this application. Arguments: url Fichier ou URL thanks jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 19 Jan 2016 18:47, jdd <jdd@...> wrote:
sorry
Hello,
I often have to use "rsync --delete" to mirror two very large archives usb disks.
for safety reason, I would like to mount the source read only.
usually I just mount disks in dolphin and use rsync from dolphin xterm. But like this disks are mounted rw
is there a simple way to mount a disk ro as user?
in Dolphin, the action seems to be done by kde-open5, but options do not show ro
options] urls... Un outil en ligne de commandes pour les opérations réseau transparentes
Options: -v, --version Displays version information. -h, --help Displays this help. --noninteractive Non-interactive use: no message boxes. If you don't want a graphical connection, use --platform offscreen --author Afficher les informations sur l'auteur. --license Afficher les informations sur la licence. --desktopfile <file name> The base file name of the desktop entry for this application.
Arguments: url Fichier ou URL
thanks jdd
Interrims solution, if your source has a consistend mount-point: Create a [nice-name-here].desktop file / starter with the following EXEC= line: EXEC=xdg-su -u root -c /usr/bin/mount -o remount,ro [source-mount-point] Not the nicest (ask for root), but works for sure. Plug the disk in, (it will be mounted read-write), then use the created "program" from above, which will change the drive from read-write to read-only. (You can validate that with a simple call to "mount" in a terminal) Then you can operate (more) safely. - Yamaban.
On 01/19/2016 06:47 PM, jdd wrote:
I often have to use "rsync --delete" to mirror two very large archives usb disks.
for safety reason, I would like to mount the source read only.
I'd maybe add such a line to /etc/fstab to bind-mount the mount point over itself with the read-only option set: /mnt /mnt none bind,ro,user 0 0 Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 20/01/2016 15:59, Bernhard Voelker a écrit :
On 01/19/2016 06:47 PM, jdd wrote:
I often have to use "rsync --delete" to mirror two very large archives usb disks.
for safety reason, I would like to mount the source read only.
I'd maybe add such a line to /etc/fstab to bind-mount the mount point over itself with the read-only option set:
/mnt /mnt none bind,ro,user 0 0
Have a nice day, Berny
thanks, but the udisksctl is exactly what I needed :-)) jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Dienstag, 19. Januar 2016, 18:45:04 schrieb jdd:
[...] is there a simple way to mount a disk ro as user? [...]
The tool udisksctl is for non-root users and IIRC dolphin uses the udisks API for mounting. So, this might work for you: udisksctl mount --block-device /dev/sdaX --options ro Gruß Jan -- Don't put animals with sharp teeth or poisonous fangs down the front of your clothes. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 19/01/2016 20:12, Jan Ritzerfeld a écrit :
udisksctl mount --block-device /dev/sdaX --options ro
YES! that's the solution; I even can use /dev/disk/by-label/xxxx as it will probably always be the same source (to various targets) thanks, I didn't know of udiskctl! jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Bernhard Voelker
-
Jan Ritzerfeld
-
jdd
-
Yamaban