LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-14-2011, 09:37 AM   #1
ahmadirad
Member
 
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, 09:47 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,028

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
^
Code:
mkdir /var/www/html/files/download
mite need to be root.
 
Old 11-14-2011, 09:52 AM   #3
ahmadirad
Member
 
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, 04:31 AM   #4
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
can you post the result of:
Code:
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-16-2011, 12:00 AM   #5
ahmadirad
Member
 
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.

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

Rep: Reputation: 0
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
 
  


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 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 09:41 AM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 03:48 PM
Error: `mv olddir/ newdir/ ` no longer works on new version of bash? meili100 Linux - Software 12 02-20-2008 06:06 PM
mount --bind olddir newdir --> anyway to do this at startup ? darkknight_9 Linux - Newbie 4 04-21-2005 06:35 PM


All times are GMT -5. The time now is 08:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration