LinuxQuestions.org
Register a domain and help support LQ
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 02-16-2012, 11:41 AM   #1
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Rep: Reputation: 1
Smile mkdir: cannot creat directory. How to enable mkdir for user in usb dir?


Hello all.

I have mounted as root an external drive as ntfs.

I cannot create a dir as a user inside the /mnt/usb where it was mounted on.

I have done chmod a+rwx -R for the dir but still cannot do this.

Thanks in advance =)
 
Old 02-16-2012, 11:43 AM   #2
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
output

output of ls -al:

Code:
miguel@madruga:/mnt/usb$ ls -al
total 4892
drwxrwxrwx 1 root root   12288 Feb 15 18:32 .
drwxr-xr-x 4 root root    4096 Feb 16 15:39 ..
drwxr--r-- 1 root root       0 Sep  9  2010 $AVG
drwxr--r-- 1 root root   12288 Feb  1 17:28 backup-ubuntu-january2012
drwxr--r-- 1 root root   16384 Feb 15 00:28 downloads
drwxr--r-- 1 root root       0 Feb 14 17:08 expunged
drwxr--r-- 1 root root    8192 Apr 12  2010 MarioLino
drwxr--r-- 1 root root       0 Jan 30 14:25 option-files
drwxr--r-- 1 root root    4096 Feb 10  2011 PDFS
drwxr--r-- 1 root root   12288 Feb 11 18:06 privado
drwxr--r-- 1 root root    8192 Jan 30 19:45 Programs
drwxr--r-- 1 root root    8192 Nov 25 10:43 Project_Pentagon
drwxr--r-- 1 root root    4096 Jan  8  2011 $RECYCLE.BIN
drwxr--r-- 1 root root       0 Mar 23  2011 RECYCLER
drwxr--r-- 1 root root       0 Nov 28 04:08 System Volume Information
drwxr--r-- 1 root root    4096 Aug 22  2010 System_Volume_Information
drwxr--r-- 1 root root       0 Feb 14 17:08 .Trash-1000
 
Old 02-16-2012, 11:46 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
How was it mounted and which mount options were used?
 
1 members found this post helpful.
Old 02-16-2012, 11:48 AM   #4
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
mount

mount -t ntfs /dev/sdc1 /mnt/usb
 
Old 02-16-2012, 11:49 AM   #5
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
ls -al of mount dir

Code:
miguel@madruga:/mnt$ ls -al
total 16
drwxr-xr-x  4 root root 4096 Feb 16 15:39 .
drwxr-xr-x 21 root root 4096 Feb 15 19:41 ..
drwxr-xr-x  2 root root 4096 Feb 15 21:10 usb
drwxr-xr-x  4 root root 4096 Jan  1  1970 usb2
 
Old 02-16-2012, 11:55 AM   #6
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
default -w -rw

In the "man mount" :


Code:
-w, --rw
              Mount  the filesystem read/write. This is the default. A synonym
              is -o rw.
If this is the default, why do I have this after doing "mount -t ntfs /dev/sdc1 /mnt/usb"?


Code:
miguel@madruga:/mnt$ ll
total 24K
drwx------  1 root root  12K Feb 15 18:32 usb/
drwxr-xr-x  4 root root 4.0K Jan  1  1970 usb2/
drwxr-xr-x  4 root root 4.0K Feb 16 15:39 ./
drwxr-xr-x 21 root root 4.0K Feb 15 19:41 ../
 
Old 02-16-2012, 12:01 PM   #7
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
sudo

By the way I do not use sudo. I dont know if that is a reason.
 
Old 02-16-2012, 12:02 PM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
If you don't give any uid or gid mount options then all files on the NTFS file system are owned by root as you have seen.

You can either add a uid option for you user name or use a gid option with one of the groups that may be set up set up for that purpose -- perhaps plugdev or storage depending on the distro. Your user would need to be a member of the group.

Which distro are you using?

There's helpful information here.
 
1 members found this post helpful.
Old 02-16-2012, 12:03 PM   #9
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
debian squeeze

debian squeeze
 
Old 02-16-2012, 12:07 PM   #10
edgardl
LQ Newbie
 
Registered: Feb 2012
Location: Mexico
Distribution: Debian
Posts: 9

Rep: Reputation: Disabled
Hi, Linux cannot write on ntfs in that way, you could install ntfs-3g for example and then mount it

Something like
Code:
# mount -t ntfs-3g -o rw,umask=000 /dev/sdc1 /mnt/usb
 
1 members found this post helpful.
Old 02-16-2012, 12:11 PM   #11
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
reply

Ok, I did just now install ntfs-config and ntfs-3g with aptitude.

And executed the last command proposed.

I can now mkdir on external drive.

Thankyou. =)

I would like to ask for caveats because although thread is solved I have not fully understood the procedures I just made.
 
Old 02-16-2012, 12:16 PM   #12
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
Smile conclusion

If I understood this, I should execute that last command whenever I want to mount this external drive.

It will not be automatically mounting all ntfs drives I plug in my usb's?

Thankyou.
 
Old 02-16-2012, 12:18 PM   #13
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
umask

It is the umask that provides full rwx access to everyone?
 
Old 02-16-2012, 12:20 PM   #14
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
I suppose it is time to mark the thread as solved.
 
  


Reply

Tags
chmod


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
Firing some shell command like ls,mkdir dir-name via kernel module ankur0921 Programming 2 06-11-2010 05:24 AM
mkdir fails (even with -p ): No such file or directory axisofevil Linux - General 5 06-01-2010 01:51 PM
mkdir fails ( even with -p ): No such file or directory axisofevil Linux - Software 2 06-01-2010 12:11 PM
how to give options like '-v' for mkdir using system call mkdir() ? nehapawar Linux - Newbie 2 02-05-2010 03:13 AM
Mounted NFS directory can't mkdir rcmonroig Linux - Newbie 5 11-04-2009 11:57 PM


All times are GMT -5. The time now is 08:10 AM.

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