LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-23-2009, 01:02 AM   #1
chibi
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Archlabs
Posts: 65

Rep: Reputation: 15
mount --bind; changes to mounted dir do not update original? Solution?


Hello, thanks for reading. I'll give a really quick background first so you'll know what I am doing.

I have a folder of folders with a binary and some configuration files. I want to give someone ftp access to this folder and the folder and files in it, but not the binary. Because they also have the ability to run the binary, and its a security risk to allow them to change what that binary is.

So thinking I was clever, I wrote a script that created dummy files/folders that pointed to the real ones using symbolic links (ln -s) and then gave the user access to those. This however definitely did not work with ftp. They just show up as shortcuts and do not behave as a symbolic link. So I did some research and learned about mount --bind. So again I did the same thing, created dummy files/folders and used mount --bind to point them to their real counterparts.

This appeared to work in FTP just fine until the user started adding/editing files. All the files the user uploads or edits does apply to the mounted folder, but remains unchanged to the real original folder. Thus the binary does not recognize any new configuration the user puts in place because it never sees them.

So I guess my question is, how can I create dummy files/folders that a user can alter/add to using ftp that causes the originals to accept the changes/modifications?

ln -s doesn't work. mount --bind does not work. What else is there?

Help greatly appreciated! Thank you.

-Chi
 
Old 08-17-2009, 08:57 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
How about FUSE BindFS?

Some things bindfs can be used for:
- Making a directory read-only.
- Making all executables non-executable.
- Sharing a directory with a list of users (or groups).
- Modifying permission bits using rules with chmod-like syntax.
- Changing the permissions with which files are created.

(http://sourceforge.net/apps/mediawik...Systems#bindfs)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
floppy dir changes ownership when mounted mortyg Linux - Newbie 3 01-04-2009 01:49 PM
iscsi mounted dir read only utdom Linux - Server 2 05-28-2008 09:20 PM
A simpler solution to my original post on regEx linuxmaveric Programming 6 04-04-2008 02:57 AM
rsync -u Does it update the contents of a dir if that dir is changed? crazyivan Linux - Software 1 04-02-2008 04:08 AM
NIS : Home dir not mounted p_test Linux - Networking 2 03-11-2006 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration