Hi How in the world do I set the mount to use user 10000? I have a situation, where I'm setting a backup-script for my laptop. I have same user-id in both linux-box. Then I need to copy also the e-mails, that has bits set only for owner. So, I need to mount the remote with that user-id to be able to copy those files... But no, there is just no way I can find out what the man-page is saying. It clearly says, that I can mount with a certain user-id, but it just wont come clear how! I have read my brains out reading the man-page, that that man-page really smell! Wonder if anyone could write the man-page in plain text... Jaska.
On Thursday 31 January 2002 22.50, jaakko tamminen wrote:
Hi
How in the world do I set the mount to use user 10000?
I have a situation, where I'm setting a backup-script for my laptop.
I have same user-id in both linux-box. Then I need to copy also the e-mails, that has bits set only for owner.
So, I need to mount the remote with that user-id to be able to copy those files... But no, there is just no way I can find out what the man-page is saying.
It clearly says, that I can mount with a certain user-id, but it just wont come clear how!
I have read my brains out reading the man-page, that that man-page really smell!
Wonder if anyone could write the man-page in plain text...
I think troff is more or less necessary :) Are you talking about nfs? The normal behaviour for an nfs mount is to retain the user id of the user reading the file. i.e. If uid 10000 on box1 reads through an nfs mount a file on box2, the permission bits are checked as if it was uid 10000 on box2. Or if you mean actually being allowed to issue the mount command as a non-root user, I think the only way is to set up the parameters in /etc/fstab and set option user, to make it user mountable. regards Anders
Hi Here is output of the copy-script: ---this is copied okay, like all before this one ---- `/mnt/kotikone/Lissun_docut/Tyojuttuja/svoy_TP_2001_A.xls' -> `/home/lissu/Lissun_docut/Tyojuttuja/svoy_TP_2001_A.xls' --- then starts the problem---- `/mnt/kotikone/Mail/outbox' -> `/home/lissu/Mail/outbox' cp: cannot open `/mnt/kotikone/Mail/outbox' for reading: Permission denied `/mnt/kotikone/Mail/sent-mail' -> `/home/lissu/Mail/sent-mail' cp: cannot stat `/mnt/kotikone/home/lissu/Mail/.*index*': No such file or directory This is because kmail will alter the permissions so, that only the owner can read the file. I tried to put "user" in fstab, no help... There must be a way to do this... Jaska. Viestissä Perjantai 01 Helmikuu 2002 00:06, Anders Johansson kirjoitti:
On Thursday 31 January 2002 22.50, jaakko tamminen wrote:
Hi
How in the world do I set the mount to use user 10000?
I have a situation, where I'm setting a backup-script for my laptop.
I have same user-id in both linux-box. Then I need to copy also the e-mails, that has bits set only for owner.
So, I need to mount the remote with that user-id to be able to copy those files... But no, there is just no way I can find out what the man-page is saying.
It clearly says, that I can mount with a certain user-id, but it just wont come clear how!
I have read my brains out reading the man-page, that that man-page really smell!
Wonder if anyone could write the man-page in plain text...
I think troff is more or less necessary :)
Are you talking about nfs? The normal behaviour for an nfs mount is to retain the user id of the user reading the file. i.e. If uid 10000 on box1 reads through an nfs mount a file on box2, the permission bits are checked as if it was uid 10000 on box2.
Or if you mean actually being allowed to issue the mount command as a non-root user, I think the only way is to set up the parameters in /etc/fstab and set option user, to make it user mountable.
regards Anders
On Thursday 31 January 2002 23.21, jaakko tamminen wrote:
Hi
Here is output of the copy-script:
---this is copied okay, like all before this one ---- `/mnt/kotikone/Lissun_docut/Tyojuttuja/svoy_TP_2001_A.xls' -> `/home/lissu/Lissun_docut/Tyojuttuja/svoy_TP_2001_A.xls'
--- then starts the problem---- `/mnt/kotikone/Mail/outbox' -> `/home/lissu/Mail/outbox' cp: cannot open `/mnt/kotikone/Mail/outbox' for reading: Permission denied `/mnt/kotikone/Mail/sent-mail' -> `/home/lissu/Mail/sent-mail' cp: cannot stat `/mnt/kotikone/home/lissu/Mail/.*index*': No such file or directory
This is because kmail will alter the permissions so, that only the owner can read the file.
I tried to put "user" in fstab, no help...
There must be a way to do this...
Are you running this backup script as root or as user "kotikone"? If you're running it as root you could do one of two things If you're not on a secured lan you could do a temporary su in the backup script to the correct user, so you'll get the right uid to read the files, or if you are on a lan where you can trust all machines, use the flag no_root_squash in /etc/exports on the machine serving the nfs share. That way, root on box1 will also be root on box2. Without it it will be mapped to user nobody, and will only be able to read files readable by user nobody //Anders
participants (2)
-
Anders Johansson
-
jaakko tamminen