Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Locked Files

  • 04-06-2008 5:00pm
    #1
    Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭


    Hi Folks,

    I have bought a new bigger ext HDD and when moving files over I am finding alot of files are locked thus canceling the move/copy operation. The files typically can be unlocked via finder but one or two wouldnt let me. Is there some command I can run to unlock all the files so I can copy them?

    Also I dont understand why there are any locks on any files, the ext HDD was formated as FAT-32 so there should be no permissions on the source HDD and the new ext HDD I just created partitions and they are copying ok.

    Dave


Comments

  • Registered Users, Registered Users 2 Posts: 725 ✭✭✭muggyog


    Were they OS 9 files? Get DropUnlock (NOT DROPNUKE!!) @ http://www.divnull.com/products.html

    You can use the terminal app if you know your way round UNIX

    chflags will let you lock and unlock files.

    chflags uchg ~/Desktop/test.txt

    this would lock a file

    chflags nouchg ~/Desktop/test.txt

    this would unlock the file

    Havent used this command so I dont know if you need sudo before them.


  • Registered Users, Registered Users 2 Posts: 6,790 ✭✭✭cornbb


    Thanks for posting about chflags, thats a handy thing to know. Wish I knew about it a few months ago when I was in the same boat as the OP :pac:

    To add to the tip, I notice it has a -R flag so it can be used to unlock recursively (i.e. all files rooted in a directory).


  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭PDD


    Hi Folks,

    Cheers for the update at least now I know they can be unlocked. Unfortuantely my unix knowledge is almost non existant and I was wondering if this command can be applied recursively to an entire drive or partition?

    Dave


  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭PDD


    As an aside can anyone recommend a good backup application for the Mac that would compare two drives/partitions and ensure that there is a duplicate copy in boht places. Under windows I would use the excellent SyncBack but I wouldn't know what would be a good Mac alternative for it.

    Dave


  • Registered Users, Registered Users 2 Posts: 725 ✭✭✭muggyog


    I suspect if you do a Sudo -R chflags nouchg and drag&drop the HD icon ( useful feature of OS X ) you will be sorted. Dragging the file or volume icon into the Terminal window ensures the correct path is entered.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭PDD


    Hey Muggyog,

    Unfortunately the -R isnt a recognised switch, I presume that is for a recursive walk through the filesystem?

    Dave


  • Closed Accounts Posts: 5,366 ✭✭✭luckat


    I find SuperDuper good. When I moved to a bigger hard drive last week, I just put the new drive into an external enclosure and told SuperDuper to copy the entire (internal) drive over to it. Then I swapped out the drives, and there are no problems reading files on the new one.

    What you do with SuperDuper is make an original complete backup, then backup your User folder once a week or however often you like; every now and again you may want to replace this with a complete backup again.


  • Registered Users, Registered Users 2 Posts: 725 ✭✭✭muggyog


    Are you sure you used a capital R?

    Note the examples at the bottom of this page.


    Sorry just noted I have a slight dyslexia problem, command should be sudo chflags -R nouchg


  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭PDD


    Hi Folks,

    Thanks a million, it was a capital R that I was missing. Sorry about that I feel like a mongo :confused: Unfortunately it still didnt work, I tried the following and got an error about invalid files any help really appreciated:

    sudo chflags -R nouchg '/Volumes/Dads Stuff/'
    chflags: /Volumes/Dads Stuff//Storage2/Houses work sheets/Shopping List.doc耀��������: Invalid argument

    Dave


  • Registered Users, Registered Users 2 Posts: 6,163 ✭✭✭ZENER


    You might need to enclose Dads Stuff in quotes, i.e.

    sudo chflags -R nouchg /Volumes/"Dads Stuff"/

    Otherwise it appears as 2 separate commands to the shell, I think.

    Have you tries using Get Info to change the permissions, there's an option to apply the permissions to all enclosed items, or am I being a mongo now ?

    ZEN


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭PDD


    Hey Zenner,

    Tried that and the same error, I had quotes around the entire directory path beforehand to account for the space. Your right there is one for the get info as Ive used it before but I've looked at the get info and it wont allow me to unlock it from there as all it will say for the volume/partition is that I have read & write ownership but wont let me change it. This also applies for all of the individual directories on the volume. Completely lost here.

    The wierd thing is that the partition was FAT32 so why the bloody hell are there any permissions or locks on there in the first place.

    Dave


  • Registered Users, Registered Users 2 Posts: 725 ✭✭✭muggyog


    Spaces are important to UNIX and ZENERs suggestion should work.

    The double slash after 'Dads Stuff' is a bit strange (is it a typo?). If there are two slashes thats your problem, filenames cannot contain '/' in UNIX. Windows does not have this issue but UNIX most certainly does.

    Another way to make certain of the correct path, as I mentioned earlier, is to drag the hard disk icon into the terminal window after you enter the correct command string. This automatically puts in the correct path (useful for long or complicated paths).


  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭PDD


    Hi Folks,

    Just to keep ye updated that worked fine, I had to run it on all of the volumes and even then two or three times on some occasions due some files still locking. All is copied now and all is good :-)

    Dave


Advertisement