LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-22-2008, 12:46 PM   #1
ronnie123
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Rep: Reputation: 0
Cant chown / chmod mounted disc


I have installed Debian on one of my harddrives, but I also have Vista on a different drive.

However, I would like to be able to browse through my files on the other discs, which are of the NFTS format.

When I try a normal mount, I just get that it's not possible to mount.
When I do it via the terminal, I'm able to mount it, but only as root.
When I have mounted the disc via the terminal, only root user can enter the folder (the rights on the folder is owner r-x and group / others have ---)
Does anybody have any idea how I can fix this?

Thanks for any help :-)

Edit:
I have ofcourse tried to use chown, as the topic suggests, but it has no effect.

Last edited by ronnie123; 06-22-2008 at 12:49 PM.
 
Old 06-22-2008, 01:24 PM   #2
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
post the output of
$ ls -l [mountpoint]
and
$ id
 
Old 06-22-2008, 01:28 PM   #3
ronnie123
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Original Poster
Rep: Reputation: 0
debian:/# ls -l /media
totalt 844844
-r-------- 2 root root 32768 2008-04-01 18:18 3043A1C8-85F6-4A03-99A9-19C0E879B3F5.avi
-r-------- 2 root root 32784 2008-03-22 20:39 3043A1C8-85F6-4A03-99A9-19C0E879B3F5.avi.enc
-r-------- 2 root root 12576 2007-12-12 17:11 53 - 56 - Felwood (Irontrees, elementals).xml
-r-------- 2 root root 46888120 2007-10-28 19:33 7-10_vista32_dd_ccc_wdm_enu_53254.exe
-r-------- 2 root root 54533696 2007-12-25 16:36 7-12_vista64_dd_ccc_wdm_enu_55818.exe
dr-x------ 1 root root 4096 2007-09-28 09:40 AllSoftware
dr-x------ 1 root root 4096 2008-04-08 21:01 AppBackup
-r-------- 2 root root 450007 2007-12-22 22:36 Bloody_Goomba.rar
-r-------- 1 root root 561857 2007-12-22 22:13 bloody.zip
dr-x------ 1 root root 0 2007-12-25 17:51 Crysis.Win2k3.64bit.CrackFix-Enforcer
-r-------- 2 root root 3770510 2007-12-25 17:51 Crysis.Win2k3.64bit.CrackFix-Enforcer.rar
dr-x------ 1 root root 0 2008-04-27 19:03 desperate housewives
dr-x------ 1 root root 524288 2008-06-22 02:32 Directory
dr-x------ 1 root root 20480 2008-06-22 16:07 Downloads
dr-x------ 1 root root 16384 2008-05-01 16:29 Favorites
-r-------- 2 root root 7021 2007-12-12 14:22 felwood52-57.xml
-r-------- 2 root root 13597 2007-12-13 09:17 I-Doser_All_Doses.3746808.TPB.torrent
-r-------- 2 root root 7739809 2007-12-13 08:57 IDoserSetup.exe
dr-x------ 1 root root 0 2007-09-30 22:02 iPodApplicationManager
dr-x------ 1 root root 0 2007-08-02 05:04 Manhunt User Files
dr-x------ 1 root root 0 2007-10-01 13:36 msdownld.tmp
dr-x------ 1 root root 98304 2008-05-01 16:37 musik
dr-x------ 1 root root 0 2007-10-25 03:27 ncdc
-r-------- 2 root root 497214 2007-12-22 22:24 Passage_v3_Windows.exe
dr-x------ 1 root root 4096 2007-12-22 22:00 plat
-r-------- 1 root root 522445 2007-12-22 22:00 plat.zip
dr-x------ 1 root root 4096 2007-09-25 12:19 Po
dr-x------ 1 root root 4096 2007-10-22 17:50 portal_slowmotion_mod_Portal_Mods_dotcom
dr-x------ 1 root root 0 2007-10-26 13:45 ProgramData
-r-------- 2 root root 5558902 2007-12-21 18:12 Pure Pwnage vs. denwO - WoW is a Feeling (club dance remix).mp3
dr-x------ 1 root root 4096 2008-02-11 11:29 $RECYCLE.BIN
dr-x------ 1 root root 4096 2007-10-29 15:31 RECYCLER
dr-x------ 1 root root 0 2007-12-25 17:05 rzr-c64f
-r-------- 1 root root 4197479 2007-12-25 17:02 rzr-c64f.7z
dr-x------ 1 root root 0 2007-12-25 17:48 rzr-crys
-r-------- 1 root root 3440957 2007-12-25 17:48 rzr-crys.7z
dr-x------ 1 root root 0 2007-09-26 20:46 skeyx
dr-x------ 1 root root 16384 2008-06-22 15:26 spill
-r-------- 2 root root 734318592 2008-03-14 21:39 Stephen_Lynch-Live_at_the_El_Ray.Ripped.by.SOS.avi
dr-x------ 1 root root 4096 2007-10-29 15:07 System Volume Information
dr-x------ 1 root root 0 2007-10-09 16:49 Vista_Live_Messenger_8_1_by_Stianu89
-r-------- 2 root root 1444296 2007-10-09 16:48 Vista_Live_Messenger_8_1_by_Stianu89.rar
dr-x------ 1 root root 0 2007-10-29 10:36 VistaTweaker
-r-------- 2 root root 338629 2007-10-29 10:35 VistaTweaker.zip
dr-x------ 1 root root 0 2008-02-28 18:47 WatchNow
-r-------- 2 root root 8834 2007-12-12 18:53 WPL 54-57 Bears & Spiders.xml

daniel@debian:/$ ls -l /media
ls: /media: No Access


$ ID:
uid=1000(daniel) gid=1000(daniel) grupper=20(dialout),24(cdrom),25(floppy),29(audio),44(video),46(plugdev),106(powerdev),109(netdev),1 000(daniel)
 
Old 06-22-2008, 01:31 PM   #4
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
wow... did you mount it directly to /media?
don't do that!
media should be for automount, and if you must, make a folder in /media. Better yet mount it in /mnt/yourfolder.
After that do a:
chown daniel:daniel /mnt/youfolder
as root

If you want it to always mount to /mnt/something, you'll have to create a fstab entry.

Last edited by oskar; 06-22-2008 at 01:35 PM.
 
Old 06-22-2008, 01:45 PM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
You can edit /etc/sudoers to give yourself sudo permissions to mount drives/partitions so that your command would then be: sudo mount /dev/sdX, or sudo mount <mount point>, where <mount point> is the mount point named in /etc/fstab. Technically, you are still mounting as root, but you don't need to su to root, you just use sudo for temporary root authority to run one command.

In re the user having access to the partition once it mounted, it all in your /etc fstab. Change the mount parameters on the /dev /mountpoint line to allow users to access the partition, instead of just the user who has mount authority (root).
 
Old 06-22-2008, 01:56 PM   #6
ronnie123
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by oskar View Post
Better yet mount it in /mnt/yourfolder.
After that do a:
chown daniel:daniel /mnt/youfolder
as root
Ok, now I tried that, but still, I cant access the disc :-/

When I use chown, it says something like:
changing rights on "mnt/250GB": Filesystem with read-only access
(it's translated from danish, so it may have some translation errors..)
 
Old 06-22-2008, 03:07 PM   #7
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
You probably can't chown it while a read-only filesystem is mounted to it...
Unmount it, chown the directory, remount.

Last edited by oskar; 06-22-2008 at 03:09 PM.
 
Old 06-22-2008, 03:26 PM   #8
ronnie123
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Original Poster
Rep: Reputation: 0
I tried that, and when i chown to daniel:daniel, it works fine until i remount again.
As soon as i remount, the folder changes owner straight over to root again..

Any more ideas?
 
Old 06-22-2008, 03:42 PM   #9
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
Well then you'll have to create an fstab entry (/etc/fstab)
/dev/sda1 /mnt/mountpoint ntfs defaults 0 0

Of course you have to change the device name and mountpoint accordingly.
I think "defaults" includes the user option. Just to be safe you can change it to defaults,user
If it is an sata drive sometimes starting the pc with an usb drive plugged in will screw up the naming, in that case you should mount it using the uuid. - I always use uuid... can't hurt.
ls /dev/disk/by-uuid
to see the uuid for the devices.
then instead of i.e. /dev/sda1 you would use uuid= and then the number you got from the previous command.
after you saved fstab you can instantly mount it using:
mount -a
Try it as user first... I think it should work.


I'm just adding this because you are a new user:
While I know this stuff by heart, it's really the reason why I prefer to use the most newbie friendly distros available. it just saves time to just install ntfs-config, run it and have it take care of all that automatically, and even have it mount it with ntfs3g if you need rw access.
Thinking of it, maybe ntfs-config is in the debian repos... I doubt it though.
Nothing against debian, it's a rock solid distribution, I just want you know that this isn't the way it has to be... this is 2008 for crying out loud!

Last edited by oskar; 06-22-2008 at 03:54 PM.
 
Old 06-22-2008, 03:52 PM   #10
ronnie123
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Original Poster
Rep: Reputation: 0
I tried that as well to now (both with /dev/sda1 and uuid), but still nothing :-/

Are there perhaps a way as to how I can use my root user in the desktop enviroment?

Last edited by ronnie123; 06-22-2008 at 03:54 PM.
 
Old 06-22-2008, 03:57 PM   #11
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
Yeah, add yourself to the sudoers file as bigrigdriver suggested, then start an application with: gksu (in gnome) or kdesu (from kde) -
kdesu nautilus ./
for excample.
in gnome it should work fine to just use sudo. KDE is much more picky.
 
Old 06-22-2008, 03:58 PM   #12
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
what does it say when you do "mount -a"?
 
Old 06-22-2008, 04:02 PM   #13
ronnie123
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Original Poster
Rep: Reputation: 0
mount -a:
mount: can't find /dev/sda1 in /etc/fstab or /etc/mtab

daniel@debian:/mnt$ kdesu
bash: kdesu: command not found
 
Old 06-22-2008, 04:09 PM   #14
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
damnit...
just to make sure, could you post the output of
cat /etc/fstab
and
su -c 'fdisk -l'

Quote:
daniel@debian:/mnt$ kdesu
bash: kdesu: command not found
apt-get install kdesu

?

try
apt-get install ntfs-config
while you're at it
 
Old 06-22-2008, 04:12 PM   #15
ronnie123
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Original Poster
Rep: Reputation: 0
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sdb1 / ext3 defaults,errors=remount-ro 0 1
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0


Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 30401 244196001 7 HPFS/NTFS

Disk /dev/sdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 24792 199141708+ 83 Linux

Disk /dev/sdc: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 1 9734 78187331 7 HPFS/NTFS

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/hda2 2551 14592 96727365 f W95 Ext'd (LBA)
/dev/hda5 2551 14592 96727333+ 7 HPFS/NTFS



And debian didn't find neither one of those packages :P
 
  


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
Apache, chmod and chown Nr18 Linux - Networking 1 08-10-2006 12:59 AM
chown and chmod specialized Linux - Hardware 9 04-04-2006 10:26 PM
chmod/chown and folders :) chibi Linux - Newbie 2 04-28-2005 05:56 PM
Chown & Chmod swatward Linux - Newbie 2 03-01-2005 01:57 PM
Arg!! chown /chmod Kanon Linux - Newbie 10 01-16-2005 04:05 PM


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