LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   why is my mounted drive read only? (https://www.linuxquestions.org/questions/linux-general-1/why-is-my-mounted-drive-read-only-41938/)

nyroc 01-18-2003 12:54 PM

why is my mounted drive read only?
 
User cannot write or delete anything from my second hard drive.

it is a 45 gb drive on the secondary ide ribbon, formatted with ext3. Only root can write to it. I can't find the answer to why a user cant write. The user can read. When I su and chmod, chown, and even chgrp files and folders to "user, user and, 777", user can't delete anything. Root can delete. user's uid is 500 and his account does not have any special changes made to it.

This is all done from the console, from a shell, in RH8. There is one other drive mounted a / that has /boot and swap on it too.



here is my fstab entry the mount point is /data:

/dev/hdc1 /data ext3 defaults 1,1

the entry for / is similar, and "user" can write or delete anything that is 777 (for exampe), or he owns (with 755 for example) or anything the is group "user" and is 775. Everthing is fine on this drive, but not the other one.

rm file.txt
rm: remove write-protected regular file `file.txt'? y
rm: cannot remove `file.txt': Permission denied


this is the file's long listing
ll file.txt
-rwxrwxrwx 1 user user 1331200 Sep 16 11:20 file.txt

id -a user
uid=500(user) gid=48(apache) groups=48(apache),25(named),501(sudoers)


Thanks.

oot 01-18-2003 03:23 PM

You must have write permission on the directory containing the file(s) to delete them.

nyroc 01-18-2003 06:24 PM

Hmm, your right. It works. I am new to linux and the parent directory's permission never crossed my mind. I noticed /tmp is 777.

Thanks very much.


All times are GMT -5. The time now is 05:12 AM.