Windows-sort-of shortcut
Hello, can anyone help a noob please?
I would like to share a folder (including subfolders) on my NAS ( WD MyBook World Ed. WhiteLight) with a friend over internet (FTP). So far I created a user, installed vsftpd and set to jail it's users in their /home directory. Now say, there is a folder /shares/music which I want to appear readable only in /home/user. Do I use the mount command or should I go different path? Thank you for any advice. |
Would a (symbolic) link do the job?
jdk |
I don't know. Well, I don't know what a symbolic link is or what is it used for. Simply, I want a remote user to access his /home folder, where he can download data from another folder on the hard drive. So the contents of this "another" folder would be listed in his home folder as read only.
|
Hi,
a symbolik link, as suggested by jdk, corresponds exactly to a "shortcut" in Windows. Just create a symlink from the user's home dir to /shares/music and make sure that /shares/music and the files contained therein are not writable for the user. PS: You can create a symlink using ln. |
oh yes, thank you, that worked
well, not the way I want, but I mean, the symlink worked My problem now is that ftp sends error 500, but when I log in as root and go there, it takes me where it points to. Is it because the user is jailed to it's /home folder? ---------- EDIT ---------- also if I connect via phone using ES File Manager this symlink doesn't work as shortcut but phone wants to open it as video/audio/text/etc .... wouldn't the mount command work better here? |
Code:
wouldn't the mount command work better here? |
Symlink will not work due jail. That way anybody could create symlink to other place and read data outside jail. You can do
Code:
mkdir /home/user/shared_music |
OK, we're getting there
mount --bind works the way I want, but have 2 more questions on how to and that is: 1. How do I represent spaces in path when typing command in putty? ie "/shares/Music/Hip Hop" won't work because of the space before last word 2. when I mount like this: "mount --bind /shares/Music /home/user" - how do I unmount later? tried "umount /shares/Music" but didn't work, it says "couldn't umount, invalid argument". Also, shouldn't "mount -l" list all mounted devices including my bind folder? ---------- EDIT ---------- also, a bit off topic, when I ssh this user into my NAS he can see all contents (can't write though) of the hard drive, how do I make this visible to root only? |
Code:
1. How do I represent spaces in path when typing command in putty? ie "/shares/Music/Hip Hop" won't work because of the space before last word Code:
Also, shouldn't "mount -l" list all mounted devices including my bind folder? |
Quote:
also, when I try Code:
mount --bind -o ro /shares/music /home/user/test ---------- EDIT ---------- just to show, mount -l shows this: Code:
securityfs on /sys/kernel/security type securityfs (rw) |
Quote:
Quote:
Quote:
Are you using busybox? The last two problems may be connected with that. It is simplified program, some tools may not work with "full potential". Also your /etc may be mounted read only, or /etc/mtab is not writable, therefore mount/umount can not store data it need for unmouting and listing. Try "cat /proc/mounts" if you have proc mounted. Quote:
|
eSelix ... yes I'm using busybox (2.26 I think it is) what looks like the main problem is
cat /proc/mounts returns all mountpoints including those mount by me and for some strange reason I wasn't able to unmount /home/user before I unmount /shares/user (which I must have accidentaly created) also I have a root access so I can change anything I guess anyway thank you, I think I found answers I was looking for, time to go sleep now, will try once again tomorrow. |
All times are GMT -5. The time now is 02:30 PM. |