LinuxQuestions.org
Visit Jeremy's Blog.
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-11-2013, 04:05 PM   #1
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 425
Blog Entries: 28

Rep: Reputation: 2
can write, make but can't delete rename files?


SCROLL DOWN

I currently have udev and misc to do the auto mounting job, but I cant seem to write or edit the files on the mounted flash drive or hard disk. So I tried manually mounting with:
Code:
ted:$ sudo mount -o umask=0000,uid=1000,gid=1000 /dev/sde1 /mnt/loop
And the result is surprisingly the same. How options must I mount to make the drives editable to the account "ted"?
Thanks,
Ted

Last edited by ted_chou12; 02-12-2013 at 04:39 AM.
 
Old 02-11-2013, 04:12 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
try this:

Code:
# mount /dev/sde1 /mnt/loop
# chown -Rf user:users_group /mnt/loop
# chmod -Rf 755 /mnt/loop
# exit
# touch test /mnt/loop/
in short that will just perform a simple mount. once it is mounted you are changing the owernship and permissions on the DRIVE to that of the user. then you are just seing if you have permissions to touch the drive.

Now if the external drive or usb stick are NTFS permissions you will have to mount them completely different. do a google search for CIFS mounts.
 
Old 02-11-2013, 04:17 PM   #3
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 425
Blog Entries: 28

Original Poster
Rep: Reputation: 2
These are fat32 and ntfs drives. But cifs mounts are not for local drive partitions, they are for network drives. What I am trying to mount are physical local drives. I am pretty sure that the NTFS permissions won't affect the mounts in anyway, because I don't have accounts named root and ted on my other windows computers.
Thanks,
Ted

Last edited by ted_chou12; 02-11-2013 at 04:18 PM.
 
Old 02-11-2013, 04:32 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,688

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
You will have to create mapping tables for ntfs-3g to use the drive.

Otherwise it will not be compatible with Windows anymore.
 
Old 02-11-2013, 04:58 PM   #5
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 425
Blog Entries: 28

Original Poster
Rep: Reputation: 2
can I not grant user all permissions? If not please show me a way to map the tables.
Thanks,
Ted
 
Old 02-11-2013, 05:42 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,688

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
Quote:
Originally Posted by ted_chou12 View Post
can I not grant user all permissions? If not please show me a way to map the tables.
Thanks,
Ted
You can, but the result would not necessarily be Windows compatible.

Check the manpage for ntfs-3g.usermap. It appears to build the map based on the existing files on the NTFS volume. I don't know how you add new entries, but suspect it would be up to windows to do that so that it can identify the windows user.
 
Old 02-11-2013, 08:13 PM   #7
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 425
Blog Entries: 28

Original Poster
Rep: Reputation: 2
EDIT my bad. The weird situation is only caused by an internal card reader, the card reader only reads but doesn't write for my user account. It does allow me to write with my root account though. I found that being quite weird, I will post up info regarding my card reader after some research.
Code:
ted:$ cat /proc/bus/usb/devices

T:  Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 3.00
S:  Manufacturer=Linux 3.0.17 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.3
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 3.00
S:  Manufacturer=Linux 3.0.17 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc= 43/900 us ( 5%), #Int=  4, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 3.00
S:  Manufacturer=Linux 3.0.17 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12   MxCh= 4
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=058f ProdID=9254 Rev= 3.10
S:  Manufacturer=ALCOR
S:  Product=Generic USB Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms

T:  Bus=03 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=1.5  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=2166 ProdID=6649 Rev= 1.00
S:  Product= USB OPTICAL MOUSE
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   6 Ivl=10ms

T:  Bus=03 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#=  4 Spd=1.5  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0461 ProdID=0010 Rev= 1.04
S:  Manufacturer=NOVATEK
S:  Product=USB Keyboard
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 3.00
S:  Manufacturer=Linux 3.0.17 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 8
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.00
S:  Manufacturer=Linux 3.0.17 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:1d.7
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0aec ProdID=3260 Rev= 1.00
S:  Manufacturer=Generic
S:  Product=USB Storage Device
S:  SerialNumber=20040722175241000
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Code:
ted:$ sg_map
/dev/sg0  /dev/sda
/dev/sg1  /dev/scd0
/dev/sg2  /dev/sdb
/dev/sg3  /dev/sdc
/dev/sg4  /dev/sdd
/dev/sg5  /dev/sde
/dev/sg6  /dev/sdf
Bus 001 Device 003: ID 0aec:3260 Neodio Technologies Corp. 7-in-1 Card Reader

By my wild guesses are Compact Flash, SM, MMC /SD, MS. The one that I regularly use is /dev/sde1 (SD) others are probably useless by now.
Does anyone have any ideas?
Thanks,
Ted

Last edited by ted_chou12; 02-11-2013 at 09:13 PM.
 
Old 02-12-2013, 12:19 AM   #8
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 425
Blog Entries: 28

Original Poster
Rep: Reputation: 2
http://ubuntuforums.org/showthread.php?t=965461
This thread was exactly what I was looking for:
Quote:
/dev/sdb1 /media/MMCSD vfat umask=000 0 0
I guess we should share the answer and spread the idea out.
Ted
 
Old 02-12-2013, 04:29 AM   #9
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 425
Blog Entries: 28

Original Poster
Rep: Reputation: 2
STOP

Hey,sorry. Additional problem. I think this is very much related so I didn't bother to open a new thread:
When I do this mount:
Code:
ted:$ sudo mount /dev/sde1 /mnt/loop -o utf8,umask=000,user=1000,gid=1000,user
I am able to delete files in /mnt/loop, but when I attempt to add it to my /etc/auto.misc:
Quote:
SMC -fstype=vfat,utf8,umask=000,user=1000,gid=1000,user,rw :/dev/sdc1
CFC -fstype=vfat,utf8,umask=000,user=1000,gid=1000,user,rw :/dev/sdd1
MMC -fstype=vfat,utf8,umask=000,user=1000,gid=1000,user,rw :/dev/sde1
MSC -fstype=vfat,utf8,umask=000,user=1000,gid=1000,user,rw :/dev/sdf1
I can only write to existing file, but I can't rename or delete them. Can anyone plz point me in the right direction in this weird situation?
Thanks,
Ted

Last edited by ted_chou12; 02-12-2013 at 04:40 AM.
 
Old 02-13-2013, 05:13 AM   #10
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 425
Blog Entries: 28

Original Poster
Rep: Reputation: 2
bump
 
  


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
Mount ext3 partition in /home/USER/Documents with read/write/execute acces for USER anonymous234 Linux - Hardware 2 01-12-2007 12:23 PM
user execute mount? lbdgwgt Linux - Newbie 2 11-10-2006 04:46 PM
Mount samba share at boot with user write permissions Wynd Linux - Software 2 08-21-2006 11:48 PM
booting in single-user mode with write and execute? surfbass Linux - General 2 12-09-2005 01:39 PM
How can I do an automated Read/Write SMB mount for a normal user? molear Linux - Newbie 1 07-01-2004 02:45 PM


All times are GMT -5. The time now is 02:15 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