LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-15-2003, 01:06 AM   #1
hobylinux
Member
 
Registered: Jul 2003
Location: Ohio, USA
Distribution: Mandrake 9.2
Posts: 145

Rep: Reputation: 15
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.
 
Old 09-15-2003, 12:05 PM   #2
dowmun
Member
 
Registered: Feb 2003
Posts: 119

Rep: Reputation: 15
Hi,

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.
 
Old 09-15-2003, 12:22 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.
 
Old 09-15-2003, 02:14 PM   #4
hobylinux
Member
 
Registered: Jul 2003
Location: Ohio, USA
Distribution: Mandrake 9.2
Posts: 145

Original Poster
Rep: Reputation: 15
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.

thanks again.

Last edited by hobylinux; 09-15-2003 at 02:27 PM.
 
Old 09-15-2003, 05:46 PM   #5
dowmun
Member
 
Registered: Feb 2003
Posts: 119

Rep: Reputation: 15
changing file permissions

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.
 
Old 09-15-2003, 06:30 PM   #6
hobylinux
Member
 
Registered: Jul 2003
Location: Ohio, USA
Distribution: Mandrake 9.2
Posts: 145

Original Poster
Rep: Reputation: 15
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....
 
  


Reply



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
Why does my username suddenly change? manhinli LQ Suggestions & Feedback 7 06-02-2005 01:23 AM
strange - suddenly EINTR' undeclared polrus Linux - Software 3 04-23-2005 11:03 AM
unable to change file permissions!! dcdbutler Linux - General 11 02-06-2005 09:58 AM
permissions suddenly changed for /tmp rioguia Linux - Security 1 12-12-2004 12:34 PM
Suddenly unable to connect to my web server and my ftp server. HELP! Silly22 Linux - Software 4 05-23-2004 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:11 AM.

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
Open Source Consulting | Domain Registration