Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AgencyDigital

macrumors newbie
Original poster
Mar 22, 2009
25
0
NYC
I have a locked file i can't get rid of. It's killing me. I can't unlock it. Does anyone have a remedy?
 

pilotError

macrumors 68020
Apr 12, 2006
2,237
4
Long Island
Do you know how to use terminal?

I have had files held by the ReadyNAS when I lost connection. My NAS reboots every night so it usually lets it go after the reboot.

In the odd case, you can use terminal

When you mount the ReadyNAS it will show up in finder. For instance, mine is called media.

If you open up terminal, you can

cd /volumes/media ** sets your default directory to the media directory on the NAS
pwd ** shows your current directory

** Keep using cd (change directory) to navigate to the correct directory and type

ls -l <filename>

you should see your file and who owns it. i.e.:

-rw-r--r--@ 1 michael staff 11719398 Aug 17 2008 rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv

type

chmod 777 rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv

ls -l will reveal:

-rwxrwxrwx 1 michael staff 11719398 Aug 17 2008 rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv

Then type in

rm -fv rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv

That should get rid of the file.
 

AgencyDigital

macrumors newbie
Original poster
Mar 22, 2009
25
0
NYC
Do you know how to use terminal?

I have had files held by the ReadyNAS when I lost connection. My NAS reboots every night so it usually lets it go after the reboot.

In the odd case, you can use terminal

When you mount the ReadyNAS it will show up in finder. For instance, mine is called media.

If you open up terminal, you can

cd /volumes/media ** sets your default directory to the media directory on the NAS
pwd ** shows your current directory

** Keep using cd (change directory) to navigate to the correct directory and type

ls -l <filename>

you should see your file and who owns it. i.e.:

-rw-r--r--@ 1 michael staff 11719398 Aug 17 2008 rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv

type

chmod 777 rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv

ls -l will reveal:

-rwxrwxrwx 1 michael staff 11719398 Aug 17 2008 rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv

Then type in

rm -fv rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv

That should get rid of the file.

I really appreciate the help. I am slightly unclear though.

1. In Terminal, i type: cd /volumes/"media"
2. ls -l <filename>
3. chmod 777 "rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv"
4. rm -fv "rrIRCHA08Sat-01-MarcusKim-DannySzabo.wmv"
(quotes for my file name)
 

pilotError

macrumors 68020
Apr 12, 2006
2,237
4
Long Island
Sorry it took so long to get back to you, I've been busy all day.

If you type

cd /volumes
ls -l

That will list all the mounted drives you have. These are the same that you see in the left pane in the finder window when you mount your readyNAS. I gave you an example using my ReadyNAS which I called media.

You need to keep using the cd command until you get to the directory where the locked file is. Then you run the chmod and rm commands on that file.
You just need to use your filenames (the ones you quoted or where it says <filename>).
 

AgencyDigital

macrumors newbie
Original poster
Mar 22, 2009
25
0
NYC
Sorry it took so long to get back to you, I've been busy all day.

If you type

cd /volumes
ls -l

That will list all the mounted drives you have. These are the same that you see in the left pane in the finder window when you mount your readyNAS. I gave you an example using my ReadyNAS which I called media.

You need to keep using the cd command until you get to the directory where the locked file is. Then you run the chmod and rm commands on that file.
You just need to use your filenames (the ones you quoted or where it says <filename>).

i have absolutely no idea what i'm doing in terminal. it might as well be a different language. explain this in a way you would to someone that has never used terminal before. if i just type cd/volumes or cd/volumes/"HDB" i get No such file or directory.
 

AgencyDigital

macrumors newbie
Original poster
Mar 22, 2009
25
0
NYC
Last login: Mon Apr 6 22:14:43 on ttys000
agencydigitals-mac-pro:~ KM$ cd /volumes
agencydigitals-mac-pro:volumes KM$ ls -l
total 8
drwxrwxr-x 10 KM staff 408 Apr 6 14:48 HD
drwx------@ 16 KM staff 500 Apr 6 22:22 HDB
lrwxr-xr-x 1 root admin 1 Apr 5 14:04 Macintosh HD -> /
agencydigitals-mac-pro:volumes KM$


HDB/PREVIOUS_G5/HD1/System/Library/CoreServices/boot.efi
is where the locked file lives. so what now?

thanks in advanced for your generous help, seriously.
 

pilotError

macrumors 68020
Apr 12, 2006
2,237
4
Long Island
Your close. You just need to cd to the directory you listed.

1. cd /volumes/HDB/PREVIOUS_G5/HD1/System/Library/CoreServices/
2. ls -l
3. chmod 777 <filename>
4. rm -f <filename>

** One last thing, if the file ends up with root ownership, you may have to do this before you delete the file:

ie.

ls -l

rwxr-xr-x 1 root admin 1 Apr 5 14:04 myfile

chown KM:staff <filename>

ls -l

rwxr-xr-x 1 KM staff 1 Apr 5 14:04 myfile

rm -f myfile
 

AgencyDigital

macrumors newbie
Original poster
Mar 22, 2009
25
0
NYC
Your close. You just need to cd to the directory you listed.

1. cd /volumes/HDB/PREVIOUS_G5/HD1/System/Library/CoreServices/
2. ls -l
3. chmod 777 <filename>
4. rm -f <filename>

** One last thing, if the file ends up with root ownership, you may have to do this before you delete the file:

ie.

ls -l

rwxr-xr-x 1 root admin 1 Apr 5 14:04 myfile

chown KM:staff <filename>

ls -l

rwxr-xr-x 1 KM staff 1 Apr 5 14:04 myfile

rm -f myfile

Thanks.
This was taken care of:
http://readynas.com/forum/viewtopic.php?f=23&t=27494
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.