LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   permissions glitch (http://www.linuxquestions.org/questions/fedora-35/permissions-glitch-256422/)

beatupbilly 11-18-2004 10:39 AM

permissions glitch
 
I have an external hard drive(ntfs) and I can only access it through root. I tried changing the permissions(chmod 777 Backup(name of the drive)) It claims it is succesfully changed but permissions when I check are still set to 500. when I try to change permissions through gui it says I can't change permissions on a read-only disk(because it is ntfs). Buuut, I never set permissions to root on the drive to begin with. What is going on? It is a removable disk and this shouldn't happen. Driving me crazy. Recommendations?

benjithegreat98 11-18-2004 11:16 AM

Perhaps you should look at your fstab file first (/etc/fstab). I have an ntfs partition (not external) and here is my entry in that file for it.
Code:

/dev/hda1  /mnt/windows  ntfs    users,owner,ro,umask=000 0 0
You probably won't be able to get 777 as your permissions. Since it is NTFS you'll probably just get 555 (which is read and execute for all) unless you are using one of the projects that allows full NTFS reading.

beatupbilly 11-18-2004 11:30 AM

here is my etc/fstab. Not sure where to change permissions here. my dev's are mounted at sda, sda1, sda2:

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/1 / ext3 defaults 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-hda2 swap swap defaults 0 0
/dev/sda2 /media/Backup_2 ntfs pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
/dev/sda1 /media/Backup ntfs pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
/dev/hdb /media/cdrom auto pamconsole,fscontext=system_u:object_r:removable_t,ro,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

beatupbilly 11-18-2004 11:45 AM

Nevermind I just added your user script to mine and it works now! Thanks!

jschiwal 11-18-2004 11:51 AM

For non-linux file systems, you can't use the chmod command on the mounted partition. Instead, the same information needs to be included in the mount command. Read the man mount before selecting the options that you want to use.

You can for instance, make yourself the owner (user) of the partition with the uid= options. So if your user number is 501, then using the option 'uid=501' will give you access. Also setting the group ownership with the 'gid=' option will allow you to control who may read files on the drive.
Because linux doesn't normally have write support for NTFS drives, using the 'fmask=' option for regular files and the 'dmask' option for directories makes more sense then using the 'file creation mask' since you won't be creating files on this parition in linux.

One final thing I should mention about the 'uid' and 'gid' options. You can use your username and groupname respectively. So if your userID is 501 and your username is 'beatupbilly', then the options: uid=beatupbilly,gid=users will make you the owner of the partition, and the group ownership is assigned to the 'users' group. This is what you would do instead of using the command chown beatupbilly:users /media/Backup.

jeopardyracing 12-03-2004 07:31 PM

Mount Samba Shares on Mac
 
Maybe you can help me understand this problem: unless I am logged in as roon, even though I specify the username there directories on my Mac's Samba shares that can't be read or written. Only resources with "other" permissions can be read or written on the Mac.

I strongly suspect the following is the reason: while the username is the same on both machines, my primary username = UID 1000 in Knoppix (hard drive installed) but UID 501 on the Mac! I think that when I am logged in as root in KNoppix this distinction doesn't matter, but when when I am in the user account, the Knoppix PC isn't concerned that the username is the same on the Mac's files, it looks at the numeric UID and bases its permissions on that. But shouldn't it ignore the Mac's file permissions? Despite my having dmask=777 and fmask=777 in the fstab entry the Mac's directory permissions seem to govern. Any ideas as to why my dmask and fmask aren't working? I also tried umask=000 in a shell script and encountered the same problem.


All times are GMT -5. The time now is 10:06 PM.