Hi,
I have similar question. Regrets if it is addressed elsewhere.
I have few users on my linux server and their home folder lies in /home. I checked after creating these users and ownership was user:user. They all connect through ftp (I have vsftp running on the server) and upload their files in their home folders. There is one special user who has to download these files by logging into ftp. But he should not be able to modify or delete these files, i.e. read only access.
For example let us take user1 the normal User and spuser as Special User with their home directories as /home/user1 & /home/spuser respectively. Their ownership is user1:user1 and spuser:spuser.
To make the requirement possible I used the follwoing:
1. Created a mount point under /home/spuser/ as USER1 using
mkdir /home/spuser/USER1
(The default ownership was spuser:spuser)
2. Then mounted using the following:
mount --bind /home/user1 /home/spuser/USER1
mount -o remount,ro,bind /home/spuser/USER1
But the moment I mount with the first command, the ownership of /home/spuser/USER1 changes to user1:user1 with 700 rights.
Due to the above spuser could not access USER1 and my ftp purpose fails. Can anyone guide where am I committing wrong. Your help is appreciable.
Thanks
Barani
|