suddenly unable to change permissions (very strange)
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
suddenly unable to change permissions (very strange)
i have my external hdd connected to a second box that i am trying to set up as a file server on my home network. i exported the folder where it is mounted through nfs and was streaming mp3s through it about 20 minutes ago. however, all of a sudden i'm having all sorts of wierd problems with it. it is /dev/sda1, mounted at /mnt/maxtor. my fstab has the following for it:
/dev/sda1 /mnt/maxtor vfat defaults 0 0
it mounts on boot. however, i am suddenly having strange problems with it. they are:
1. i can't unmount the drive. everytime i try, it says /mnt/maxtor: device is busy. i tried disabling nfs to see if that was why, but i am still unable to unmount it.
2. i can't change the permissions. i tried chmod 777 /mnt/maxtor, and it didn't work. i tried running nautilus as root and changing it through the preferences, and everytime i clicked on a box to check it, the check would show up briefly and then disappear (it was actually kind of funny--i just kept clicking and the checks just kept going away). for some reason, the permissions are stuck at 744 and i can't do anything about it.
3. when i cd to the directory and ls, i see everything. however, when i view the directory through nautilus (even when run as root), only the files (and no directories) show up.
this is very strange and all of a sudden. all i did was reboot my machine, and now i'm having all sorts of strange problems. any help greatly appreciated.
Every time I try to help someone with Mandrake, I end up looking stupid. I just can't get enough of that.
I would like to suggest that you try the following. If you have already done so, re-read the first sentence.
Shut down everything on your desktop (KDE?), and exit all the way back to the login screen. Make sure that no one else on your home network is accessing /dev/sda1 (If I understand this part correctly)
Enter <ctrl-alt-F1> or <ctrl-alt-del> to get to the command line.
Login as root. Make sure of the directory that you are in with <pwd>
You will probably be in /root, but that does not matter. You do not want to be in /mnt/maxtor
Try to unmount the device again <umount /dev/maxtor> , if it still says the device is busy, we are going to have to give this some more thought. The <less /etc/mtab> command tells me what is mounted on my system.
If it does unmount, then you can try your command to change the permissions <chmod 777 /dev/maxtor>
A better solution might be to let a Mandraker answer your question, but I wanted to try.
if it still says the device is busy, we are going to have to give this some more thought.
To see any process id's (PID) that have files open on /mnt/maxtor (prohibiting it from being umounted):
"fuser -a /mnt/maxtor" or "lsof +D /mnt/maxtor". If you do this as unprivileged user you'll only see processes you got rights for, unlike "root" of course. if you used "fuser" link the PIDs to their application using "lsof -p <PID_here>", "strings /proc/<PID_here>/cmdline" or ps.
but I wanted to try.
...always a cool thing to do, try. Definately.
hey, guys. thanks for the replies. well, i was able to change the permissions, sort of. first i had to add "umask=0" to my fstab for /dev/sda1, then i had to reboot. however, i would like to be able to fine tune this some (i.e. i don't want everything under /mnt/maxtor to be 777), but i'm not able to do that now. are you not able to change permissions on mounted devices? i feel like i've done that before...
as for unmounting, it, here is what fuser gave me:
[root@localhost ftpuser]# fuser -a /mnt/maxtor
/mnt/maxtor:
No process references; use -v for the complete list
[root@localhost ftpuser]# fuser -v /mnt/maxtor
USER PID ACCESS COMMAND
/mnt/maxtor root kernel mount /mnt/maxtor
any clues? i'd like to be able to figure this out if possible.
This is a learning experience for me, so I will tell you what I have tried. I do not have a setup like yours, but I do have a harddrive (/dev/hdb1) that is mounted on /music.
I went to <ctrl,alt,F1> , logged in as a user, and cd'ed into /music/a_quiet_normal_life , and started the mp3's playing.
I then switched <ctrl,alt,F2> logged in as root, and expermented with /dev/hdb1 mounted on /music
As root, I could not unmount it. Got the "device is busy" reply. I expected this.
I could change the permissions on /music while it was mounted. This surprised me.
<fuser -a /music > gave me the same results you got. I have not figured this command out yet.
<lsof +D /music> gave me a list of all the processes and PID numbers.
I think the most interesting command I tried was <fuser -kimuv /music> This showed me that two processes were running (bash and mpg321), gave me the PID numbers of each, and then asked me if I wanted to kill each one in turn. It works, too.
I doubt this will be of any use to you, but thought I would report what I had found.
wow, thanks. i ran fuser -kimuv and here's what i got:
[root@localhost bigguy]# fuser -kimuv /mnt/maxtor
USER PID ACCESS COMMAND
/mnt/maxtor root 2774 f.... fam
i chose not to kill fam, because i'm not really sure what it is. i checked the man page for it, and it seemed like something that helps with nfs, but i didn't want to kill it without being a little more certain of what killing it would do, and how to start it back up the same way its running now....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.