Changing File Ownership & Permissions

Is there a way via AppleScript to change the ownership and permissions for all files (docs & folders)en masse? Can I do so regardless of original owner or permissions for files that are not password protected?

Yes, by invoking the do shell script command and the Unix commands chown and chmod. You might get better answers in the OS X Technologies fourm: http://discussions.apple.com/category.jspa?categoryID=162.

Similar Messages

  • Accidently changed the "ownership & permissions" access admin setting to "read only"

    In the "Get Info" window on my MacBook hard drive icon, I accidently changed the "ownership & permissions" access admin setting to "read only" & now it won't re-boot the operating system. Just displays the Apple logo & running wheel on a white screen . Any advice on how best to re-set/restore would be very much appreciated, thanks

    This might help. Otherwise, it might be necessary to reinstall.
    https://discussions.apple.com/docs/DOC-2240

  • Why can't I change file ownership in the Finder when logged in as root?

    Why can't I change file ownership in the Finder when logged in as root?
    I can change it in the Finder if logged in as admin or via the terminal as root.
    Xserve   Other OS  

    N8 Thomas wrote:
    I then went into my finder preference section and changed my "New finder window show" to my computer's name.  At that point I could view and find anything within it.  this part got the job done. 
    "You don't, they only appear in open file dialogs and in tool panels like in iMovie, iPhoto.
    To view your media, you open the app that you use to manage that type of media." this on the other hand was zero help
    What you did doesn't show the Media Browser. It just shows the folders where your media is stored. You may be correct that was all that cobacc wanted. 
    The Media Browser shows the actual media in thumbnails so that you can preview the media.
    However, neither requires any Sharing services to be enabled.

  • Task or script to monitor file ownership, permissions and change as needed

    I'm using a Mac OS X Tiger (10.4.9) computer as a file server for a group of people who are (1) individually non-administrative users and (2) members of Groups. The hard drive is partitioned into 2 volumes: Vol1 has no non-admin access, Vol2 has a Shared folder containing folders with files intended for either Public or Private access. I'm admin with UID=501 and trying not to be a danger. Each other user has a unique UID. Each Group has a unique GID. The folder that all users have access to is named Pub_shares. Every user allowed to access Pub_shares is a member of PubGroup (GID=505).
    Now when a user accesses a file nested in Pub_shares, that file usually becomes owned by that user and the group membership may change from PubGroup and may undergo a change to "Read only" or "No Access." Since all members of PubGroup should have Read & Write access to files in Pub_shares, this is a problem. All files in Pub_shares, regardless of who last touched them, should remain:
    Owner = chris / Access Read & Write
    Group = PubGroup / Access Read & Write
    Others = No Access
    I've read some about Ownership & Permissions. I've seen it suggested that an admin set up an automated task, say to run every 3 minutes; that task checks file ownership and permissions and, if different, changes the values recursively to those shown above, such that:
    Owner = 501 / Access = rwx
    Group = 505 / Access = rwx
    What do I need here? An Automator workflow? A shell script? AppleScript? Cron? launchd? How do I put this together? I don't know the syntax or the expressions to use. Any help is much much appreciated. [Note again: My "server" runs Tiger 10.4.9.] Thanks.

    ..."I have some Windows users (trying) to access shared files. Will the afp inheritance options stand up to a Windows user?"...
    No the afp inherit settings won't apply to windows sharing, but I think there are equivalent settings that can be applied to smb.
    ..."I thought, too, I'd read somewhere that inheritance options use the topmost volume folder to set inheritance patterns."...
    I am not able to double-check this for Tiger, but I don't think that is the case. As far as I know, with those settings enabled (and it doesn't work reliably if only one is enabled) permissions and ownership should be inherited from the folder that the items are added to.
    ..."My topmost folder on vol2 is "Shared" but it contains both Pub_shares (accessible by members of PubGroup) and a few Private_shares (folders accessible by members of various private groups)."...
    Sorry I missed that point in your earlier post. The above would cause complications if a user were to move items from the private area to the public area. The inheritance only applies to when files are created, so something moved from the private area to the public area would retain its original permissions. To make it work, the public and private areas would have to be set up as separate shares, rather sharing the whole volume.

  • Can't change file ownership.

    To be careful, I did a new install of Lion on a freshly formatted disk (by installing SL first, of course). One of the first things I tried was Aperture. My Aperture Library is on a separate (SS) disk. When I tried to launch Aperture, it knew where to look for the file (I used Migration Assistant to transfer preferences) but it said it could not open it because of some ownership problem. (I can not say exactly what, because now it will open - I don't know what changed.) However, I still can't change the ownership. Get Info thinks that the owner is the new dummy user I created when I first set up Lion (before Migration assistant), when I try to change the owner with the gear popup at the bottom of "Aperture Library Info", I get the error message "The operation can't be completed. An unexpected error occurred (error code -8076)."
    "Unexpected", of course, is subjective. There is a reason I didn't jump to updating my system disk! I haven't tried repairing permissions, but I'm not optimistic about that.
    When an "unexpected" error occurs, why doesn't it trigger an automatic report to Apple?

    This program you recommend is fugly and complicated...
    You should see the other way to do it!
    Most likely...
    When the 1st screen comes up, look for the Browse button, select the FAT drive, give it a Share Name, click the Windows (SMB) sharing bar & select Shared , enter your admin PW, click on "Show File System Properties", check Inherit Permissins, give the rights you need...
    Any more questions after you Update Share...

  • Changing file access permissions?!

    I have a MacBook Pro retina running os x mountain lion, if that helps any of you guys answer this question. I recently took a screenshot of an area of the screen using the command-shift-4 combination. When i was trying to open it, though, an  error came up saying that i didnt have the permission to open the file. It told me to got to get info and change file permissions.
    How do I change file permissions and why does it say this in the first place??
    Thanks,
    RZ

    Doing a screen shot creates a file on the users desktop which they should already have permission to use.
    So if it's saying you don't means there is something else wrong with your machine.
    Do these to things first.
    1: #6 Repair Users Permissions (this will fix the in user folder permissions)
    2: #12 OnyX (free) cache cleaning and will repair OS X permissions.
    ..Step by Step to fix your Mac
    What is basically going to happen is your going to reset the permissions of all files on the machine back to what they should be and not what something caused it to become off.
    Doing all the OnyX steps in Maintainence and Cleaning is going to reset everything else in the system like caches etc., so it's like it just came from the factory which will cause those caches to rebuild anew and free of corruption that might have occured.
    OnyX also has flags as it checks the drive for other issues, thus gives you a warning of other potential problems.
    Make sure you have backups of your users files off the machine to a storage drive (not only TimeMachine) before you atempt any repairs as all the remaining software can be replaced except your files in case it turns out your problem is much larger than anticipated.
    Most commonly used backup methods

  • How to change file ownership/permission on Airport Extreme Time Capsule

    I have a 3TB Airport Extreme Time Capsule that currently have a folder with a number of files.  The problem is it won't let me delete some of these files because I don't have permission.  On a mac it would be trivial to either take ownership or change my permissions.  Any ideas on how I can do this on the TC?

    niblettes wrote:
    I only know what OSX tells me -- so my information is only as good as its messages.
    Locked files seem like a good possibility though.
    Your first post seemed to say that some specific files couldn't be deleted. If you know any of their names, see if one is locked.  if not, that isn't the problem.  If it is, unlock it and try to delete.  If it still won't delete, that's not the problem, either (or at least not all of it).
    How can I just make all file unlocked since I have no idea which of the tens of thousands of file are at fault?
    I know in OSX its easy to change permissions on a folder and then propagate that change to all child foders and files.  Does locking/unlocking work the same?
    If you don't know of any specific files, try creating one, locking it, then seeing if you can delete it. 
    There doesn't seem to be any way to unlock all files in a folder. 
    Do you want to delete everything on the TC?  If so, just erase it with Airport Utility -- only takes seconds.
    EDIT:  These files wouldn't be in Time Machine backups, would they?  If so, you can only delete entire backups via the Finder, not individual files or folders.  But the message OSX usually sends when you try that says so fairly clearly.
    Message was edited by: Pondini

  • Removing ownership & permissions for all files burned to a DVD?

    Hello,
    I am new to the concept of "ownership & permissions". Do they apply to files burned to DVD or just the files on the computer? I would like to burn some files onto a DVD for backup and I do not want to copy the "ownership & permissions" settings of the files - I just need to backup the files only. I would like to back the files up for a year or two and I am concerned that in the future I may not remember my usernames or passwords to access these files from the burned DVD.
    Do "ownership & permissions" apply to files burned onto a DVD? Or does the DVD burning process erase the "ownership & permissions" settings? I tried to burn a DVD from OSX by creating a burn folder and I didn't see any setting that allowed me to remove the "ownership & permissions" settings.
    Thank you for any insite into this.

    Thanks Mulder,
    Here is what I am trying to do:
    I do not need to backup any system files - I already have OSX on my original DVD if I needed to re-install. I only need to backup the users' document files and maybe some email folders in the users' libraries.
    I set up three accounts:
    1. The first account is for admin purposes only.
    2. The second is for my own use - it is the account used most often on this computer.
    3. The third account is for my family.
    Note: I will set up a fourth account for our student renter later.
    I will have access to the user names and passwords of all these accounts in case I need to go into the accounts to back up their documents. But the user(s) of the family account will not have my password - so the kids don't accidently erase any of my files.
    When working in the second account (which is used most often by myself), I sometimes need to place newly created files into the "document" folder on our family account (the third account). And so I purposely changed the "Ownership & Permissions" on the "document" folder on our family account (the third account) to Group: second account. This allows me (the second account) to place files into the "Document" folder of the third account (the family account). After doing this, I also need to change the "Ownership & Permissions" of any added files to Group: third account so the user(s) of the family account can edit (read and write) the files I add from the second account.
    An alternative setup that I decided not to use: I could have made use of the "users/shared" folder for this, however, I do not want everyone to be able to access these files - especially when I set up a fourth account (or even more accounts) in the future. I only would like to share the contents of the third account's "Document" folder between two users (user of the second account and the user of the third account).
    Now I will continue the explanation of my setup:
    Over time the "Document" folder of the third account (the family account) will become filled with a mixture of files with different Ownerships - some created from the second account and some created from the third account - but all editable from either the second account or the third account by assigning each other access via the "Group" designation in "Ownership & Permission". Because of this mix of files with different ownerships, I could, if I wanted to keep the settings consistent, select the "Document" folder of the third account (the family account) and change the ownership of all enclosed items to the user of the third account by using the "Apply to enclosed items". I would probably also change the "Group" designation to the second account too.
    I will be able to make all these changes because I have the user names and passwords for all the accounts.
    Now here is my main question:
    My concern is that when it comes time to backup the document folders onto DVD, what if in a couple years I forget these passwords? You see, I would rather not copy any "Ownership & Permissions" settings of the files onto the DVD. Lets say that in a couple of years I go back to my DVD backup and need to pull off some old jpeg files and put them onto my computer. When I insert the old backup DVD will it say: "Sorry, you do not have access priviledges to view these files" or something like that? That would be a real problem. These are my own files. Why would I want to risk making an important backup DVD un-useable in the future because of some long-and-forgotten permission settings?
    What I would like to do is copy all my files onto DVD for backup in such a way that "Ownership & Permissions" are not copied. Why put the risk of a limitation on your important backups? Is there a better way to do this? What do other people do?
    Am I making this more complicated than it has to be? As you can tell, I am a beginner with OSX (and permissions) and I am looking for some advice. Thanks
    Mulder, when you wrote:
    "If you're trying to backup just selected files, such as your purchased music or applications, etc., then ownership and permissions shouldn't be a problem."
    did you mean that ownership and permissions are not copied? That would be great. But I am not sure if that is what you meant to write. Thanks!

  • Changing Ownership & Permissions caused Volume to Disappear

    When changing "Ownership & Permissions" on one of my volumes, under ""Ownership & Permissions > Details > Others" I selected "No Access." As a result the volume has disappeared from the desktop. As a result I cannot access it even though I am the Administrator. How do I get the volume to reappear again on the desktop so that I can change the "Ownership & Permissions" back to normal? I am using OS 10.4.9. Thank you.
    eMac Power PC G4   Mac OS X (10.4.9)   800 MHz, 512 MD SDRAM

    Follow the instructions in the section of this FAQ which is relevant to your situation.
    (21095)

  • File Ownership via Command Line

    Hello - oh my I went and did a stupid thing. I renamed my home folder and restarted which logged me as a brand new user. I can see my previous folder in the Users folder with all of it's files and everything is there - but I can't access it through the log-in pane.
    I have been told by more than a couple of mac stores that it will require 5-7 days to fix... however I googled it and found one specific document on what to do at the command level to fix this. I need assistance from anyone who knows the right syntax in which to do this. I have started by making a backup of all the original home files I want to keep. This is what I found on-line...
    "Changing File Ownership: chown
    The chown command is used to change the ownership of files. Only the root user can execute the chown command. The simplest form, and the one in which you'll end up using it the most frequently, is chown <username> <filename> , which changes the ownership property of <filename> to belong to the user <username> . The command can optionally be given as chown <username> : <groupname> <filename> to change the user and group at the same time. Additionally, -R can be specified after the command to cause a recursive change in an entire directory, instead of to a single file. The command documentation table is shown in Table 24.1"
    Can someone show me how the command line should look as I proceed with this?
    Thank you very much.
    -Derek
    MacBook   Mac OS X (10.4.8)  

    Actually, I was thinking about being even more cautious (being there, done that, ain't pleasant).
    Let me make sure I understand where you are:
    1/ you have only one login, it's your new name, but the Home associated with it is empty (has all the "regular" folders that come with the creation of a new account)
    2/ your old account cannot be accessed upon login but you "ex" home is still there and you have access to it
    If that's right, then do 2 things
    1/ create a new admin account. Call it whatever you want. In case of anything, you'll still have one with admin privileges. You may want to keep it for the future. It's always a good idea to have such an account, never used but for troubleshooting, where the Preferences are pristine.
    2/ start copying (not moving) what you had in your old home into your new one (you wanted that new name anyway, right?), making sure that the privileges are indeed associated with your new name. That should work as you are doing the copying from your new account.
    When you are all done and have made sure that everything works, then you'll be able to delete the old folder. Or you may want to keep it around for a while.
    If you have too much stuff to copy (movies, etc...), then let me know. Having the "third" account (the one I mentioned in 1) may help you. You could log in with that one, and change the names back of your homes (old and new). You would have to check what you have under Syst Pref/Accounts

  • Change File Permissions (Ownership) Recursively

    While running under my User, I restored some files (from Retrospect) for another User on my MacBook.  Using the Finder, I moved them to the other User's folder but they when I look at the directories and files that I moved, I see that I am still the "owner" in the file permissions.
    I need to change file permission ownership recursively down the hierarchy of several folders, e.g., Documents, etc.
    I'm happy to use chown in Terminal if someone will just give me a clue on the proper command.
    Thanks for your help.
      - nello
    MacBook (Early 2006)
    10.6.8

    Well,
    $ man chown
    gives you the chown manual page, which is always a good idea to read if you're not familiar with the command. In this instance, I think the command would be
    $ chown -vR <owner> <file>
    But you might feel more comfortable with a GUI tool like BatChmod.

  • Mac OS 10.7.4, installing Microsoft Office 14.2.7, error "The Installer can't open the package. There may be a problem with file ownership or permissions."

    Mac OS 10.7.4, updating new version Microsoft Office 14.2.7, ERROR "The Installer can’t open the package. There may be a problem with file ownership or permissions."
    The Apple Installer version is Version 5.0.1 (537).
    When I check the Installer Log, I find only these two messages that I do not understand.
    Jul 12 09:29:13 Bruces-MacBook-Pro Installer[423]: Install's runner tool is not properly configured as a setuid tool.
    Jul 12 09:29:13 Bruces-MacBook-Pro Installer[423]: Unable to create InstallController
    I changed all the permissions for all the Microsoft Office Folder users to Read and Write.
    Restart, same error

    See:
    https://discussions.apple.com/thread/1948155?threadID=1948155&tstart=1
    I had identical Installer Log failure notices: I used Houdini to view the invisible files and per Limnos' suggestion cautiously dragged
    user > library > preferences > com.apple.installer.plist out of that folder onto my desktop and double-clicked on the .pkg file again and it opened and installed properly.
    My Installer now works properly on all .pkg files.

  • Permz - Quickly change file permissions in any file manager

    Designed to be integrated into any file manager, permz is a bash script which presents a GUI menu.  You can use it to quickly change file permissions and ownership as a normal user or as root, and delete files as root.  I wrote this because I have yet to see a file manager that isn't cumbersome for this - the mechanism is usually buried on a second tab of the Properties window, and changing permissions often involves multiple clicks in a grid. To change the owner of a file, you need to type the username. And if the file is owned by root, you can't do anything.
    permz --help
    Presents a GUI menu for changing file permissions/ownership. May be run
    as a normal user or root.
    Requires: zenity gksu
    Optional: sudo (recommended to prevent multiple root password prompts)
    Usage: permz FILE [...]
    MENU FUNCTIONS:
    rwxrwxrwx Sets file(s) to given permissions
    Sticky Clear/Set Performs "chmod -t" or +t to clear or set the sticky
    bit. You may select to clear/set sticky in addition
    to changing other permissions.
    Recursive go-rxw "chmod -R go-rxw" on file(s) recursively, denying
    access to non-owners
    Recursive go-w "chmod -R go-w" on file(s) recursively, denying write
    to non-owners
    Recursive ugo+rX "chmod -R ugo+rX" giving read access to all. Also
    sets +x for directories and executables.
    Recursive ugo+w "chmod -R ugo+w" on file(s), giving write to all
    (You may select several compatible recursive functions above at once)
    Owner USER As ROOT Sets ownership to USER:USER as root
    DELETE As ROOT Deletes file(s) as root. Must be used alone or with
    "Perform Recursively" (to delete directories - USE
    WITH CAUTION). Not available if permz is run as root.
    Perform As ROOT Run as root to change selected permissions.
    (Use of root is automatic when changing ownership)
    Perform Recursively Adds -R to all chmod, chown, and delete commands to
    descend into subdirectories. Use in conjunction with
    any other functions. (Recursion is automatic for
    "Recursive" functions above)
    Current su command is set to: gksu -gS
    If you're somewhat familiar with bash, adding additional options or changing the existing ones is straightforward.
    I have tested it pretty thoroughly but if you do encounter anything amiss please let me know.
    More details at http://igurublog.wordpress.com/downloads/script-permz/
    And in the AUR at http://aur.archlinux.org/packages.php?ID=36978
    Instructions for integrating permz into PCManFM-Mod are here.
    Last edited by IgnorantGuru (2010-05-05 13:53:08)

    rransom wrote:Recursive ugo+rX would be more useful than "Recursive ugo+r (dirs +x)".  (The +X feature of chmod is available at least in GNU coreutils, FreeBSD, and POSIX 2003.)
    Done - thanks for the tip.  I also left the old code active in there with just the menu option disabled, so if anyone wants it the other way or wants both it's easy to enable.  The difference is that the old way won't make any files +x, just dirs.
    permz doesn't provide every possible setting of permissions, just common ones, so you may want to customize it.  But I used to have these as user actions when I used Krusader and I found these were the handy ones, at least for me.

  • How do I stop DW CS6 randomly changing file permissions via FTP?

    How do I stop Dreamweaver CS6 12.0.1.5842 randomly changing file permissions when it uploads files to my web server via FTP.
    I can no longer trust Dreamweaver to upload websites correctly as it changes permissions on some files which then deny the server access to the file which in turn makes the webpage unreachable/return a 403 error.
    This is driving me insane.
    I'm using an early 2011 Macbook Pro 10.7.5.

    Hi,
    I'm having this problem too. Has Adobe fixed the issue yet? This appears to be an Adobe problem, not all the web hosts out there. CS6 is ramdomly (meaning: not every time) changing permissions on files uploaded with it and is not usable for web work until this problem is fixed by Adobe or a solution is provided. If I wanted to use a separate FTP program I would not have recommended that my employer buy multiple Adobe CS6 product licenses. One of the primary appeals of DW is the integration of FTP into the workflow.
    I am using a destop iMac2.8 GHz Intel Core 2 Duo, 4 gigs of 800 MHz DDR2 SDRAM.
    OSX 10.7.5
    I am using DW Version 12 Build: 5808
    Dreamweaver CS4 that I was using until this new purchase was working just fine. No file permisssion changes. I am being forced to go back to using it until Adobe posts a fix for this.
    I should ask while I'm here: has anyone found a solution for this yet?
    Thanks,
    -c-

  • Unable to download from AppStore, updates,etc.Messages 'the installer is damaged' to 'there might be a problem with file ownership and permissions.' I am the owner and only user of a new MBP. What could be going on?

    Is anyone having the same type of problems I'm having with Lion. I have a new MacBook Pro, received 7 weeks ago, preinstalled with Leopard 10.6.7. I didn't migrate anything from my old iMac, wanted a clean install from the Apple Store. While there, I asked for the upgrade to Lion 10.7, however their system was down.
    I  installed it myself, wirelessly about a week later, and Apple emailed me a receipt. Now, I've had to call support directly last week when I lost Mail, Address Book, was unable to open Preview or iTunes, among other problems. Seemed fixed after a session that baffled even the store tech.  Now I am unable to download or install the recent Mac updates for Lion, from the App Store, could not install Adobe Reader, etc. Messages range from 'A network error has occured - Check your Internet connection and try again' to 'The Installer is damaged and cannot open the package. There may be a problem with file ownership or permissions.'  All fail and I'll probably have to call Apple again. I am frustrated beyond words.  Logs 'Install's runner tool is not properly configured as a setuid tool', domain errors, 'attempt to write a readonly database, and on and on. I have barely done a thing on this computer except search online for help with these problems. Safari gives me a 'You are not connected to the internet' too often. Diagnostics disagrees. I do see wi-fi problems in the forum. Disk and permissions were fine at the beginning of the earlier problems, checked first by support tech. I'm not sure if support tech even knew. I was just happy they were fixed. Anyone have these download and/or install problems after a 'clean bill of health' so to speak, only a week ago?

    Let's try the following user tip with that one:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

Maybe you are looking for

  • Audio Tracks Not Sounding

    Hello, I have several clips (and audio tracks) in a sequence that won't play audio all the sudden. I have no idea why. The problem audio tracks are darkened, and play fine outside the sequence. I'm working in FCP v. 6.0.1. Does anyone know what could

  • Error when installing CS4 on windows

    I had a total hard drive failure. Afer replacing my HD I downloaded my apps and am now trying to reinstall. Everytime I try to install, the installation program crashes halfway through and thenshuts down. What do I have to do? I am reinstalling CS4 w

  • Error: Module Exception

    Hello I created a File to File interface, to pick the file from FTP and again put the file to FTP.This is a simple interface for my learning. The channel is scheduled to run every 1 minute. Every minute I see below error in the Adapter monitor "Last

  • Quicktime Player "The operation could not be completed"

    Hi I was wondering if anyone could help me, I just used the quicktime screen recording and after i finished it i tried to save it. It started saving but then it said "The operation could not be completed" I need help I don't know what this is and I'v

  • Oracle client install on Windows Cluster

    Hi, Is it possible to install Oracle Client (v10.2) on a Windows Cluster (win2003 Enterprise Edition) so that it is cluster aware? Essentially, I need this to support Linked servers and ODBC connections (to Oracle database) on a Sqlserver instance wh