Change multiple user folder permissions

Hi,
I'm hoping someone can help me. Stupidly I moved the folder where the users directories are with the finder. the result is I am having problems when a user logs is due to incorrect permissions. does anyone have a script or terminal command I can use to correct this issue. basically I need the folder name to be the owner and no access by other users. Thanks!

Hi Anthony, you could use something crude like
#!/bin/bash
Users=/Users.txt
data=/pathto_Homedirectories
#for a list of users from data folder
ls -1 $data > $Users
for name in $(awk '{print $1}' < "
sudo chown -R $name $data/$name
done
exit
This is assuming the Home Directory names are standard.
You will need to edit the value for data.
As always test, test, test and have a good known working backup.

Similar Messages

  • Changing user folder permissions

    My wife and I both have admin accounts on my computer. I want to be able to easily transfer files from my user folder to hers without running into permissions problems. For example, I may want to take a photo from my Pictures folder and drop it in her Pictures folder. I can't do that because access is blocked to everyone but her. It's irritating to have to drop the file on a neutral ground, log in to her account, and take the file and put it in her folder. I logged in as root and tried to change the permissions by giving admin group read and write privileges but it gives an error of -60002 if I try that. I can't change the permissions while not logged in as root since the option is greyed out. Any ideas? I don't care one bit about "compromising security".

    Hi Xeep,
    Error -60002 is "The authorization parameter is invalid".
    From your account, have you first tried changing the Owner to yu, then the Group to admin, then the owner back to her?
    Or better yet, try BatChMod...
    http://www.macchampion.com/index.shtml

  • Repair user folder Permissions using terminal

    Disk utility won't repair ownership & permmisions in the root user folder. I did a transfer of apps from my old Tibook and something went wrong. Some of my folders list "Owner" as unkown etc. I had this issue a few years back when restoring from a cloned drive, and someone on this forum suggested a Terminal command to reset my user folder back to defaults with the proper ownership and that worked! Unfortunately I can't remember the command line ("sudo chown...something like that). Changing permissions on each folder and file using the "get info" command is too tedious. Thanks for any help.
    MBP 17in 2.33ghz Mac OS X (10.4.8)
    TiBook 667 Mac OS X (10.3.7)
    TiBook 667   Mac OS X (10.3.7)  

    Since the cursor advanced to the next line after entering each command, and no error message was returned, it sounds like the commands worked.
    The Get Info panel is sometimes slow to reflect permissions changes. Try control-option-clicking Finder's Dock icon and select Relaunch. See if that kick-starts the Get Info permissions report.
    You can verify that everything changed correctly by typing this into a Terminal window:
    ls -laR ~ > ~/Desktop/list.txt
    That will create a file on your desktop called list.txt. Open it with TextEdit. It will list every file and folder in your home directory. If your username is listed as the owner of everything then it worked correctly.

  • User folder permissions

    Hello,
    The environment: about 100 users, about 25 Windows 7 PC, DC = Server 2003 SBS, AD, local profiles with redirected desktops, documents, start menus.
    The special case: Some (generic) accounts are not supposed to be allowed to load media from external sources, such as flash drives. They must get their media from a server location.
    The part of the solution I have: Using User GPO, you can block access to removable devices for these accounts. This works - flash drives, external cd roms, hard drives, etc do not open when using those accounts.
    The issue: It is possible for a user who has external drive access to login, copy the files to his local profile on the HDD. Then it is possible for him to add the generic account that should not have access to the security permissions, allowing that generic
    account access to media they should not be able to access.
    Does anyone have any way of preventing a user from adding anyone to their local profile on the HDD? As the user is a owner on their local profile, and the profile doesn't get created until they log in for the first time, they can change any permissions and
    add whoever they want in.
    Please try to avoid a solution that runs a script after a user logs in and changes the permissions. We have 0 login scripts, everything done through group policy, and we want to stay that way if at all possible.
    Thanks

    Going to bump this...

  • Icon changes / multiple users

    Hey everybody,
    I've been trying to customize my icon set using Candybar and doing some manually. I'm the owner of the mac, my wife has a user account also. When I make changes to my account it affects hers as well, and vice versa. Does anybody out there know how I can avoid this??? and just limit the changes to our respective accounts?
    Thanks.
    Q
    iMac 20" 2.16 GHz Intel Core Duo   Mac OS X (10.4.8)   250 GB, 2 GB RAM, 256 MB RadeonX1600

    thanks for clearing that up for me I well checkout the sync-O-tunes program you had mentioned.
    Also I got the podcast to go away.
    I searched around and found several people had this same issue when they moved there library to an external drive. I had to delete my .ITL (Itunes library file) and the .xml file and then re-add the library to do it though. By doing this i lost all my ratings, play counts ect. but only the Podcast that i have subscribed to are on my TV.

  • Made changes 'User/Info/Perm'. Stuck @ Grey window @ StartUp

    So I made some slight changes on my MB Wh w/Osx Lion.; made changes in 'User/Info/Perm'. Now I'm Stuck @ StartUp w/the grey window w/apple logo.
    Attempted to repair permissions &amp; 'repaired disk' in DU. So from there in detail please, then what??? 
    Note: I have no recent or any backup, no install cd, nor the orig install disk.  Acquired this 2nd or 3rd hand.
    Thanks so much.

    Sorry me again w/ the MacBook Wh/2009 &amp; Osx Lion "stuck at grey screen" issue.  So I did as advised, but it shows the Recovery Hd, but it says it's locked?  Now what should I do???  
    Keep in mind I am not the original owner therefore I have none of the original discs.   Plus it's been who knows how long since I'attempted' to back it up.  Yes I know very careless on my part.  But could you help me Not lose what data I have...  Please????
    TYVM

  • Any reason NOT to create subfolders under user folder?

    I'm switching over from a 5+ year old MacBook Pro to a new one. I do a lot of audio recording and production work. On my old machine, which was my first Mac, I created a subfolder 'Recordings' under my user folder (let's say it's named "bob"). I don't remember why I did that. Probably I was thinking well, this stuff isn't documents.
    On the new machine, running Yosemite, I discovered that Apple in it's wisdom had made my "bob" user folder hidden, which meant I had to go figure out how to show it because there are some audio plugin settings files I needed to add manually from the old machine into my user/ Library area. Did that.
    BUT... I'm wondering if there is some reason why Apple changed the user folder to hidden (other than "you dumb users don't need to know about this stuff"), and specifically, if I should avoid creating any subfolders under my user folder? I would really rather not have my 'Recordings' folder  inside the Documents folder, but I guess I can if there's some good reason not to create subfolders under 'bob'.
    Thanks in advance.

    They didn't make it hidden (like the Library sub folder), but I believe it is no longer included in the sidebar by default. Probably for the reason you state. As you've found, you can add it back through Finder Preferences menu.
    Matt

  • Account name and user folder don't match

    Hi,
    So I don't know how to change my 'User Folder' name to match my Account name.
    The name of my user folder, 'sickjestrer4', was the Apple ID I entered when I first registered my Mac. And it became the name of the folder automatically.
    My account name, however, is my real name, Jack XXXXX.
    I want the two to match and both be called 'Jack XXXXX'.
    I've tired a few things unsuccessfully and am turning here for some help.
    I attached some links to a few photos that might help for clarity.
    http://img96.imageshack.us/img96/1655/titlerc.jpg
    http://img176.imageshack.us/img176/1291/accountk.jpg
    Any help would be appreciated.
    Thanks

    Your username on your home folder is always taken from the short name. You can change the short name of your account by right clicking on the user within the accounts pane in System Preferences and selecting Advanced Options. However this is not a smart move. It can be a complicated and painstaking process moving all required aspects and settings to the new short named account.

  • Problem changing the location of multiple users home directories...

    I've just set up a new entry level model iMac for my Mum. Without getting into a discussion about the benefits or otherwise of doing so, I partitioned the hard disk into two with the first partition for the system and the second a scratch disk for files etc. I set up two users, one for my Mum and one for my younger brother. I then copied the users folder across to the scratch disk and in advanced options in the users list set each account's home folder to the relevant user on the scratch disk. This is the same set up as I have on my own system and with which I have no problems and which runs well and cleanly. I have only one account on my system. However on the iMac, the second user (my brother) is unable to write to the new home directory. Downloads don't work and preferences including right click for magic mouse, dock etc are forgotten instantly. It seems there's a permissions issue.
    I've set the machine up this way in order to keep all their files separate from the system after their last Mac got very bogged down. I expected it to work in exactly the same way as my own. Does anyone know how to successfuly set up both user accounts in this way?
    Any advice would be much appreciated...
    Message was edited by: Jimmy Hat
    Message was edited by: Jimmy Hat

    Jimmy Hat wrote:
    I've just set up a new entry level model iMac for my Mum. Without getting into a discussion about the benefits or otherwise of doing so,
    still not advisable though IMO.
    I partitioned the hard disk into two with the first partition for the system and the second a scratch disk for files etc. I set up two users, one for my Mum and one for my younger brother. I then copied the users folder across to the scratch disk and in advanced options in the users list set each account's home folder to the relevant user on the scratch disk. This is the same set up as I have on my own system and with which I have no problems and which runs well and cleanly. I have only one account on my system. However on the iMac, the second user (my brother) is unable to write to the new home directory. Downloads don't work and preferences including right click for magic mouse, dock etc are forgotten instantly. It seems there's a permissions issue.
    how exactly did you copy the home directories? did you do it using drag and drop in finder from one account? then the copied home directories both are owned by that account and the permissions need to be changed. please clarify if that's what you did.
    I've set the machine up this way in order to keep all their files separate from the system after their last Mac got very bogged down. I expected it to work in exactly the same way as my own. Does anyone know how to successfuly set up both user accounts in this way?
    Any advice would be much appreciated...
    Message was edited by: Jimmy Hat
    Message was edited by: Jimmy Hat

  • Adobe PCD folder permissions change after launching CS5 programs

    There is a folder apparently important for Creative Suite
    5 licensing: C:\program files (x86)\common files\adobe\adobe pcd
    Unfortunately the default permissions after installing (either standard install or install from Adobe Enterprise Deployment tools) are:
    Everyone: Read
    Administrators: Full Control
    This presents a problem for using the software if your users are not local administrators.
    If you change the folder permissions to grant access to other users, than launch InDesign and/or Photoshop, the Adobe PCD permissions revert to their original settings.  I have verified that my permissions save fine by closing and reopening the folder permissions.  It's only after a CS5 program is launched that the permissions revert.
    How can I get the permissions to stay?  Until then I have to make people local admins, which is not good if they find out.  They will install all kinds of crapware and crappy legit software and break their computers further.
    Thanks,
    Josh G
    Portland, OR

    Hello Stu,
    We are running Windows 7 Enterprise 64 bit.  I don't think running this particular operating system is unique.
    The only other idea I have at the moment, besides having everyone be a local administrator, is to write a script that updates the folder permissions.  The tricky part is figuring out how often the script should run. I'm guessing that the script should run daily but I'm not sure that is frequent enough.  I suppose if the script ran hourly that wouldn't hurt anything.
    Josh

  • Multiple users - shared folders - file permissions

    I want to be able to copy and move files between two user accounts so that each user will have read-write permsssions for those files. I have the standard Shared User folder (HD:Users:Shared), and the standard Users' Shared folders.
    More specifically, I want to copy or move files to either of these shared folders and have those files take on the permissions of the shared folder into which they are copied or moved. As of now they do not do that; whether copied or moved, they retain the permissions they were created with.
    "Apply to enclosed items" only works to change permissions for items already in a folder, not for new items. I haven't found a Folder Action for the purpose, nor anything in Automator that would appear to help.

    Easiest sweetest way is to create a read/write sparse disk image and place it in your /Users/Shared
    directory.
    The default method for mounting disk images will result in the user having full ownership privileges
    of all the files & folders contained therein. Thus when scanning a mounted disk image, and copying
    data to/from it, there will be no permission related errors. The implications of this become huge
    when you realize that anyone who mounts a DMG will have full access. This allows you to share your
    data with other users without having to worry about access restrictions. This can be invaluable when
    synchronizing with a "central repository" that you need several users to have access to.
    Creating a blank disk image for storage
    You can use Disk Utility to create a blank disk image to store files. Normally, you need to gather all
    the files you want to be included into a single location before you create a disk image. However,
    with a blank disk image, you can add files to the image at any time.
    To create a blank disk image, Open Disk Utility:
    Choose File > New > Blank Disk Image.
    Type a name for the disk image, and choose where you want to save it from the pop-up menu.
    In Volume name, enter the name for the volume that appears on your desktop when you double
    -click the disk image.
    Choose the size of the disk image from the Volume Size pop-up menu.
    To require a password to open the disk image, choose an encryption scheme from Encryption.
    Choose “Single partition - Apple Partition Map” from the Partitions pop-up menu.
    Choose “sparse bundle disk image” from the Image Format pop-up menu.
    Click Create.
    Resizing a disk image
    If you can read from and write to a disk image, you can make it larger or smaller when you either
    need to save disk space or store more in it.
    To resize a disk image:
    Open Disk Utility. Select the disk image if it appears in the list of disks and volumes, and then click
    Resize in the toolbar.
    Otherwise, click Resize in the toolbar, and then select a disk image from the dialog that appears.
    Select a new size.
    You can even get fancier by creating a small app with automator that will mount the image, then
    place it (the app) in each user's login startup item list. Then the image will mount on the desktop
    when the user logs in and will be easily accessible like any other mounted disk.
    Kj

  • Changing multiple file permissions

    I have a corrupted user in Leopard.
    So I am copying all the files I need over to a new user.
    Both are administrators.
    Can I take a whole folder (Docs) and tell it to change all the files in Docs to give me read/write permissions or do I have to do each one separately?

    Should be fine. First open a Get Info panel for the folder in question, and see if there are any "custom" permissions set on it. If not, you are good to go. If yes, it is a good indication that ACLs are set on that folder, and you should go carefully from there.
    ACLs are a special system of file/folder permissions that overrides the regular UNIX permissions. They were first introduced in Tiger as a user-enabled option, but Leopard was the first OS X to make use of them extensively by the System.
    A "deny delete" ACL setting is put on many system-created folders, like your home folder, your Documents folder, etc. This is to prevent accidental renaming or deletion of them. If you try to trash your Documents folder, you can, but you will be prompted to enter an admin password.
    Clicking the "apply to enclosed items" button on one's Documents folder will set the "deny delete" ACL to all of its contents, meaning you will need to enter an admin password to subsequently delete anything inside.

  • Network drive volume name for same folder by multiple users

    I am using a 1TB USB hard disk attached to a ASUS RT-AC68U wireless router as network drive.  There are multiple user accounts created on the same MacBook Air and they need to access the same folders on the network drive.  For example, we have folder called "iTunes" created on the network drive.
    The following steps resulted in some problems encountered.
    Step 1: When user1 mounts the iTunes folder as a network drive, the general info shows:
    General:
      Kind: Volume
      Server: smb://rt-ac68u/iTunes
    Name & Extensions:
      iTunes
    Step 2: When user2 mounts the same iTunes folder as a network drive, the general info shows:
    General:
      Kind: Volume
      Server: smb://rt-ac68u/iTunes
    Name & Extensions:
    iTunes-1
    Question: Why does OS X assign "iTunes-1" as the name of the same network folder on the network drive for user2?  Is there a way to retain the same original folder name for user1 and user2, such as "iTunes", so that it can be access as "/Volumes/iTunes" by both these users? 

    tastyrico wrote:
    Hi Drew,
    Thanks for the recommendations.  They are useful tips to have in the arsenal, thanks.  However, the preferences discussed are intended for directly attached external hard disks and the specific discussion was to make it available to the network on a Mac that is powered up with no user logged in (like a OS X Server but user still need to log in).
    That's correct, I'm sorry I am wrong.
    I do remember another defaults write option for detaching network drives on 'switch to loginwindow' because I needed the same thing - eventually I gave up & disabled fast user switching, it reduced the amount of issues for the clients. Sorry for confusing the two.
    Have you considered mounting it via a startup script. At the moment it is failing because the path exists when User2 mounts it. If you try a script (at the level of the system) it should mount only once. Obviously sticking usernames & passwords into a script is not the best for security.
    I think this issue is what NFS mounts can overcome, but I haven't used them for so long. They should be able to mount with no user interaction, but they are less flexible with permissions IIRC.
    If your NAS supports NFS look at that, I think you both need to remove the user as the agent that mounts the disk. If the OS does it once (& permissions are correct) it should remove the 'diskname-1' issue.
    When it works you end up with volumes in /Network/diskname.
    I don't have a good place to start with NFS, so take a look around here…
    https://discussions.apple.com/thread/4144999
    @ElisabethBraut, do you get this error form MS…
    http://support.microsoft.com/kb/2712085
    MS apps fall apart when you have disks mounted like this, it's a consequence of MS apps using an older way to represent filepaths.

  • How do I restore the user to the home folder permissions?

    I just got an iMac from a friend and had changed the username and password for the administrator user.  Then I was going to change the home folder name.  I was looking at the info on the home folder (which at this point is still tied to the old user).  I inadvertantly removed the user from the permissions before adding the new username or even allowing all users to access the home folder.  Now I cannot access the home folder at all.  How do I restore the permissions to the home folder or add the user back to the allowed users with access to the home folder?

    dalefromdallas,
    First you should do a clean install of the computer, while your friend may have included apps, they do not belong to you unless your friend gave y ou the install media and license codes. Considering the machine is also running 10.9.2. this machine will be forever tied to his AppleID which exposes him financially. You should get the 10.6.X DVD from your friend (I'm assuming he upgrade from 10.6.x at some point) and do an erase and install, then update it to 10.6.8 then upgrade yourself to 10.9.2 Mavericks. Then you will have a clean system, otherwise you will be working with a pretty kludged system that will probably be trouble.

  • Can I change the Home Folder of users with Group Policy (or in another centralized way)?

    I know how to change the Home folder of users from AD Users & Computers -> their Properties -> Profile tab. But this is not very practical when one has users spread across many OUs, and with users being added and removed often.
    So I am wondering whether there is a way to do the same with a GPO. The closest thing I found was Folder Redirection, with which I can change the location of particular profile folders for each user, but not the location of the whole profile.
    Is there a way to redirect the entire location of users in a centralized way, using a GPO or some other mean?

    I would recommend reading that about the management of roaming profiles: http://technet.microsoft.com/en-us/library/cc784961(v=ws.10).aspx
    You can involve the use of Powershell scripts for the management of roaming profiles:
    http://social.technet.microsoft.com/wiki/contents/articles/12460.powershell-automate-roaming-profile-folder-permissions.aspx
    http://gallery.technet.microsoft.com/scriptcenter/Check-if-an-AD-user-has-a-45ed5d1c
    This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
    Get Active Directory User Last Logon
    Create an Active Directory test domain similar to the production one
    Management of test accounts in an Active Directory production domain - Part I
    Management of test accounts in an Active Directory production domain - Part II
    Management of test accounts in an Active Directory production domain - Part III
    Reset Active Directory user password

Maybe you are looking for

  • Video clips doesn't work in new keynote

    I recently upgraded keynote after installing os x maverick. When I opened my previous keynote presentation, the new keynote asked to upgrade the movie quality. And you have to click this option, otherwise the video clips will only come out as picture

  • Concatenate multiple records into one single record

    Hello everyone, Can anyone guide me how to merge multiple records into one single record like......... I am getting the data in the file like aaaaa/bbbbbbb/ccccccccccc/dddddddddddd/eee ffffff/gggg/hhhhhhhhhhhhhh /123/4567/55555/99999999/kaoabfa/eee f

  • Powershell shortcut gives"this file does not have a program associated with it for performing this action"

    Hi, We have a server where powershell gives an error. The shortcut or the context menu for start button (replaced cmd in context menu) gives an error saying "this file does not have a program associated with it for performing this action". In some ev

  • ODBC database access

    Can we access a 'remote' ODBC compliant database through a JSP page being served by Weblogic? I know that the bridge cannot be used as it is not threadsafe but has that changed or is there any other way? Also, can we link in libraries within Weblogic

  • 4500157269 -Document is incomplete: You cannot save the delivery

    Hi all, When I try to create an outbound delivery for an STO using t-code VL10B, i get an error saying the following: Error Log for coll. run 0000740903.             4500157269 000000 Document is incomplete: You cannot save the delivery.            L