LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   why i dont have the Permissions to use my hardisk? (https://www.linuxquestions.org/questions/linux-newbie-8/why-i-dont-have-the-permissions-to-use-my-hardisk-759129/)

criacuervo 10-01-2009 10:25 PM

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

reickler 10-01-2009 10:42 PM

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).

AwesomeMachine 10-02-2009 02:51 AM

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.

criacuervo 10-03-2009 12:19 AM

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!!

ongte 10-03-2009 02:13 AM

Post the output of these:

# ls -l /mnt
# fdisk -l
# df -hT

criacuervo 10-03-2009 11:11 PM

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:~$

divyashree 10-03-2009 11:23 PM

Quote:

Originally Posted by criacuervo (Post 3704530)
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.

jschiwal 10-03-2009 11:36 PM

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


All times are GMT -5. The time now is 04:24 PM.