Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-14-2011, 08:37 AM   #1
Registered: Dec 2010
Posts: 33

Rep: Reputation: 0
mount olddir to NewDir

Dear all
for some reasons i have to mount a directory into another.for this:

mount --bind /var/www/html/files/download/ /var/www/html/images/download_ric

i want ftp user that just can watch .../imagas/ can view /files/download folder
but i receive this error:mount: mount point /var/www/html/files/download does not exist

please somebody help me.thanks
Old 11-14-2011, 08:47 AM   #2
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,143

Rep: Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877
mkdir /var/www/html/files/download
mite need to be root.
Old 11-14-2011, 08:52 AM   #3
Registered: Dec 2010
Posts: 33

Original Poster
Rep: Reputation: 0
Dear schneidz
both /var/www/html/files/download and /var/www/html/images/download_ric are created before.
Old 11-15-2011, 03:31 AM   #4
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
can you post the result of:
ls -ld /var/www/html/files/download /var/www/html/images/download_ric
strace debug command might be useful to find the root cause of your problem
Old 11-15-2011, 11:00 PM   #5
Registered: Dec 2010
Posts: 33

Original Poster
Rep: Reputation: 0
Dear 16pide
it was my wrong.the old directory is Downloads not Download.

mount --bind /var/www/html/files/downloads /var/www/html/images/download_ric is true.

Old 06-05-2013, 05:37 AM   #6
LQ Newbie
Registered: Sep 2009
Location: Bangalore, India
Distribution: RHEL, Fedora, Ubuntu
Posts: 21
Blog Entries: 1

Rep: Reputation: 0

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.



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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Logrotate olddir /var/log/old_logs dman777 Linux - Software 3 01-20-2011 08:41 AM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM
Error: `mv olddir/ newdir/ ` no longer works on new version of bash? meili100 Linux - Software 12 02-20-2008 05:06 PM
mount --bind olddir newdir --> anyway to do this at startup ? darkknight_9 Linux - Newbie 4 04-21-2005 05:35 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:28 PM.

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