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 10-01-2009, 11:25 PM   #1
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Rep: Reputation: 15
why i dont have the Permissions to use my hardisk?


Hi , the thing is that i have a 400gb hd , its partitioned in two:
100 = OS
300= my stuff

i made the partitions on windows, and now when i have to use a file from the partitioned where my stuff is i have to become the root and mount it, ok, no problem, but the thing is for example , when i want to burn a CD/DVD or listen music, i cant coz only the superuser can, so to listen to music i have to become the root and use mplayer.

the question is: how can i change the hda5 permissions so the normal user can access it anytime(no needing the root to do it).

-i have debian lenny 0.5
-fluxbox
 
Old 10-01-2009, 11:42 PM   #2
reickler
LQ Newbie
 
Registered: Sep 2009
Posts: 29

Rep: Reputation: 20
Try adding "users" or "users" to your mount options in /etc/fstab. That should allow "normal" users to mount the disk and access it in the same way root would. Here are the relevant entries from the mount man page:

user Allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

users Allow every user to mount and unmount the file system. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).
 
Old 10-02-2009, 03:51 AM   #3
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,923

Rep: Reputation: 278Reputation: 278Reputation: 278
Here's an example of an:

/etc/fstab

file entry for a hard drive partition:

/dev/hda5 /mnt/hda5 vfat defaults,user 0 2

/dev/hda5 is the partition.

/mnt/hda5 is the directory where the it is mounted.

vfat is the type of file system on the partition.

defaults,user are the mount options.

0 2 are the fsck order. 0 2 indicates fsck runs after entries marked 0 0, or 0 1.

If you don't want fsck to check the file system, leave the 0 2 off the entry.

You might also need to change ownership of your media directory:

sudo chown -R username: /mnt/hda5/media_directory.

Now you should be able to play media files without being root user.
 
Old 10-03-2009, 01:19 AM   #4
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Original Poster
Rep: Reputation: 15
criacuervo@juanchy:~$ cd /mnt/hda5/
bash: cd: /mnt/hda5/: Permission denied

that happened when i did chown -R /mnt/hda5

when i typed that there was a lot of movement in the shell, but each time the command tried to change ownerchip it says:


chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/tipos de clientes': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/ventas/1-servicio al cliente.avi': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/ventas/1-ventas.avi': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/ventas/2-servicio al cliente.avi': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/ventas/2-ventas.avi': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/ventas/3-servicio al cliente.avi': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/ventas/3-ventas.avi': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/ventas/Thumbs.db': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/ventas': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas/ventas.txt': Read-only file system
chown: changing ownership of `/mnt/hda5/videos youtube/videos de ventas': Read-only file system


what is that, thx in advance!!
 
Old 10-03-2009, 03:13 AM   #5
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
Post the output of these:

# ls -l /mnt
# fdisk -l
# df -hT
 
Old 10-04-2009, 12:11 AM   #6
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Original Poster
Rep: Reputation: 15
this is the output..

criacuervo@juanchy:~$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/hda1 ext3 96G 15G 76G 17% /
tmpfs tmpfs 506M 0 506M 0% /lib/init/rw
udev tmpfs 10M 80K 10M 1% /dev
tmpfs tmpfs 506M 0 506M 0% /dev/shm
/dev/hda5 ntfs 276G 98G 179G 36% /mnt/hda5
criacuervo@juanchy:~$ ls -l /mnt/
total 20
drwxr-xr-x 2 root root 4096 2009-09-15 21:14 cdrom
dr-x------ 1 root root 12288 2009-08-16 14:33 hda5
drwxr-xr-x 2 root root 4096 2009-09-09 12:37 sda1
criacuervo@juanchy:~$ fdisk -l
bash: fdisk: command not found
criacuervo@juanchy:~$
 
Old 10-04-2009, 12:23 AM   #7
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by criacuervo View Post
Hi , the thing is that i have a 400gb hd , its partitioned in two:
100 = OS
300= my stuff

i made the partitions on windows, and now when i have to use a file from the partitioned where my stuff is i have to become the root and mount it, ok, no problem, but the thing is for example , when i want to burn a CD/DVD or listen music, i cant coz only the superuser can, so to listen to music i have to become the root and use mplayer.

the question is: how can i change the hda5 permissions so the normal user can access it anytime(no needing the root to do it).

-i have debian lenny 0.5
-fluxbox
Hello, Do one thing.It might help.

Make a directory /home/shared.This directory can be accessed to all users.And automount ur /dev/hda5 to /home/shared by /etc/fstab.
Check this and post the results.
 
Old 10-04-2009, 12:36 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Code:
/dev/hda5 ntfs 276G 98G 179G 36% /mnt/hda5
The partition uses the NTFS filesystem. You can add an entry in /etc/fstab so that the system mounts it when you boot up.
Use the "uid", "gid", "fmask" and "dmask" options to set the ownership and permissions of files and directories when the
filesystems are mounted.

Here is an example:
/dev/sda2 /mnt/vista ntfs rw,user,fmask=117,dmask=007,uid=jschiwal,gid=jschiwal 0 0
 
  


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
Debain server permissions on new files dont alow remote viewing HELP! antinull Linux - Newbie 5 11-08-2007 05:02 PM
Permissions change but dont??? paul123 Linux - Newbie 24 11-29-2006 06:26 PM
Permissions error message I dont understand? BajaNick Linux - Security 5 02-16-2005 09:12 PM
"which files to copy to hardisk for Hardisk installation " Rehan1 Linux - Newbie 9 08-21-2004 04:11 PM
can't load mandrake, says i dont have file permissions? wtf! agh help plz rApT0r Linux - Newbie 2 04-11-2004 04:26 PM


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