Setting permissions - all files need to be 644/dirs 755 [SOLVED]

I have some files that are in a complex dir tree under:
/media/data
/media/data/project1
/media/data/project1/sub1
/media/data/project1/sub2
/media/data/project1/sub100
/media/data/project2
...etc. etc.
Basically, I need all the dirs to be 755 but all the files to be 644.  Obviously I can `chmod -R 755 /media/data` but how can cause all the files to be 644 while retaining the dirs as 755?
Last edited by graysky (2010-02-14 21:34:43)

Allan wrote:chmod 755 $(find /media/data -type d)
chmod 644 $(find /media/data -type f)
find /media/data -type d -exec chmod 755 {} ;\
find /media/data -type f -exec chmod 644 {} ;\
Last edited by SemiBz (2010-02-14 21:13:20)

Similar Messages

  • Error in setting permissions on file/directory $ORACLE_BASE/jre/1.1.8/LICEN

    Hi,
    On installing Oracle 9.2 on RedHat Linux release 4, I encounterd the
    following error:
    Error in setting permissions on file/directory
    $ORACLE_BASE/jre/1.1.8/LICENSE
    This error is encountered at the inital stage of installation after inputing all the
    required settings in the OUI. and at the Installing Java Runtinme Environment 1.1.8.1.0
    Could someone tell me why it happened and how to fix it? Your help is
    much appreciated.
    There was a post on this topic only in here and said to change the permissions of the
    ORACLE_BASE .......... I have tried out all these and all the permissions and the environment settings are correct but i'm not able to proceed with the installation even after a lot of trying.
    All you guys help is verry verry appreciated..........
    Thanks,

    Do the following and post the results:
    cd $ORACLE_BASE
    pwd
    ls -al
    cd jre
    pwd
    ls -al
    cd 1.18
    pwd
    ls -alI can't imagine anyone making recommendations without seeing what you've done.

  • Error in setting permissions of file/directory

    This is the error I am getting
    Error in setting permissions of file/directory /u01/app/oracle/jre/1.1.8/bin/i686/native_threads/.extract_args
    I am running RedHat 9 and obviously installing 9.2.0.
    Any ideas on why I might be getting this. I have set permissions for the oracle user for this directory.
    Thanks
    Dave

    from root try this command
    umask
    umask must set at 0022 ... if your server not set at this number use this command
    umask 0022

  • Error in setting permissions of file/directory /home/oracle/jre/1.1.8/LICENSE !

    Error in setting permissions of file/directory /home/oracle/jre/1.1.8/LICENSE ! Installation problem of 9i databse on redhat 7.3!!I installed sun jdk 1.3 or jdk 1.1.8_v3 and created a link for /usr/local/java !

    from root try this command
    umask
    umask must set at 0022 ... if your server not set at this number use this command
    umask 0022

  • How to set permissions for files created by Windows on OS 10.8 volume

    I am in process of upgrading from an iMac with OS 10.6 to an iMac with OS 10.8.  In my office network, I store all files on my iMac and let the Windows PCs act as workstations to read/write onto the Mac.  (It's simpler to have all files centralized in one location, and only have to be concerned about backing up one volume.)
    When I had OS 10.4 and OS 10.6 any newly created file saved by the Windows PCs onto the Mac could be opened by the Mac.
    But with OS 10.8, I can not open newly created files from Windows.  The file permissions for the newly created files from the Windows PCs are: 
         PCUser = read/write;  Everyone = no access.
    What do I need to do so that newly created files from the Windows PC (currently Windows 7) can be opened by the Mac, without having to use Get Info to reset the permissions each time?

    You could try adding this Access Control Entry (ACE) to the folders you let them save to:
    sudo chmod -R +a "accountinggroup allow delete,chown,list,search,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit" /Path/to/topmost/folder
    You first need to create a group for all the sharing people you want to have access to that folder, if you don't already have one. In the example, "accountinggroup" is the group, so change that to whatever you want to use.
    The ACE allows them full access to the files in the folders. If you want to limit that, remove the option (such as delete).
    You create Groups in Users & Groups System Preference just like creating a new user. Just change the account type to Group.
    If you want a GUI to do the settings, try Sandbox.  It's got a few glitches in the Interface, but it seems to write the ACL correctly. One glitch is selecting the Group or User. I had just a list of Continuing in the popup menu. I typed in the Group name I wanted and it worked. Some errors pop up as you traverse the file hierarchy, but you can dismiss them.
    Here is an old hint, which gives a little background, and some other options: http://hints.macworld.com/article.php?story=20090219133314985
    The Server tools would allow you to set this up more easily, but if this is all you need as the server, I don't know if it is worth it.

  • AppleScript for setting Permissions Automatically -help needed

    Hello -
    I am trying to create an applescript that can run automatically each time a user signs into a Mac set up for multiple (non admin) users that will take a folder on the drive and set permissions for all sub folders and files to read/write for everybody. I want the script to essentially do the equivalent of checking to "apply to enclosing items" checkbox.
    I know very little about applescript and have not found a good tutorial online yet. Does anybody already have a script that will do this or know how to create one and set it up so that it will run automatically each time a user signs in? I think that I can probably add whatever script is created to the login items for the user to do that. But, don't I also have the problem of the script needed admin rights to reset permissions?
    Any help would be appreciated.

    What exactly are you wanting to do? There are shared folders that already exist (public and private), and Access Control List entries can be set to allow for custom access. Is this for a temporary directory or something like that that gets created when a user logs in?

  • Set Permissions for file deletion

    I need to create a new temp directory and at the end of my program, I need to delete the temp files...pretty common thing to do.  My problem is the permissions dont allow me to delete the files unless I set them first somehow.  I want to know what the settings must be in the Set Permission.VI so I can then delete the files.  How do I mechanize this? 

    Are you having this issue in both the Development Environment and the Run Time Environment? The second solution that I linked is for executables only, and only makes it so that you don't have to turn off the UAC because it has administrative privilages. Anything that an administrator is able to do, the executable will now have permission to do. To test if this solution will work at all, just right click on the executable and select "Run as Administrator". If you are still having issues when the executable is running as administrator, the above solution will not work. 
    Try running this snippet and let me know what happens. All it does is create a file in the temp directory, read its permissions, then deletes the file. This runs on my computer with no error in the Development Environment and has the permissions of binary 110110110 (Decimal 438). 

  • Setting permissions in File shares content sources

    Hello,
    we want to crawl File Shares and set them available to searches. The set up of the crawler and the indexing is not a problem and works just fine.
    The problem is that we would like to set the permissions on the results given from this content source and if possible to map the permission already on the files to the result scope. In simple words, only show the results (files) in which the AD User has
    at least read privilege.
    Is this possible? and if not which would be a solution of setting the permissions to this content source?
    Thanx in advance!
    Ioannis

    That is the default behavior of SharePoint search. It will automatically read and use the file ACL.
    One thing to note is that often users can see files but not read them on the file system, in which case they will be able to find the files in the search engine but not open them nor see within the files.

  • Setting permissions on files

    I'm currently trying to modify the file, user/library/preferences/SystemConfiguration/com.apple.Boot.plist in order to enable the use of an apple usb external superdrive on my early 2009 iMac-- the internal drive is dying. When I open this file in Get Info, the permissions are, system read & write, admin read only, everyone read only. If I attempt to add owner, nick (Me), with read & write permissions, and then the repair permissions, I get this--
    ACL found but not expected on “Library/Preferences/SystemConfiguration/com.apple.Boot.plist”
    Repaired “Library/Preferences/SystemConfiguration/com.apple.Boot.plist”
    Apparently, it doesn't like having two users with read & write permissions, but system can't be removed from the permissions list.
    In terminal, I can make the desire changes to the file, but it has no apparent effect-- i.e., the iMac still won't allow use of the external superdrive. The discs are read for a few seconds, and then ejected.
    I'm guessing I have a problem with user permissions, but I have no idea how to fix it. Any suggestions?
    thanks,
    nick

    I've used terminal to change the file, and those changes appear as they are supposed to, but it doesn't have the desired effect, i.e., the computer still won't allow operation of the superdrive. Other people with similar systems and OS are able to make it work.
    Does anyone know why on my system, "system" has read & write permissions, but I, as owner, am not even listed in the permissions list for this file? (I haven't checked to see what the case is on other files.) This doesn't seem to be the case for others, where the owner has read & write permissions, and "system" isn't even on the list. It may be irrelevant to why this isn't working, but it's the only thing I can think of at the moment.
    BTW, it doesn't seem to matter if I change the permissions or not. It doesn't work any way I do it.

  • Can I set permissions in DW 5?

    Trust me, it's NOT that I want to get into this. But here's what happened:
    My first Wordpress blog hosted on Dreamhost worked perfectly when hosted through a domain. I downloaded all the files onto my computer through DW 5, uploaded them again, everything was great. But THEN, I started the SECOND WP blog and hosted it on a Dreamhost subdomain. Everything suddenly fell apart. All of the files downloaded to DW, but nothing could be uploaded (through Put.) I just kept getting ""An FTP error occurred. Cannot open server folder ourblog.greenhillslawnandgarden.com. Access denied. The file may not exist, or there could be a permission problem."
    Also, nothing could be uploaded to the WP site for the blog hosted through the subdomain. So the advice on the WP forums is to set new file permissions for the subdomain blog files, and that will fix everything (supposedly.) "
    FTP programs ("clients") allow you to set permissions for files and directories on your remote host. This function is often called chmod or set permissions in the program menu. " (That's what they say, anyway.)
    Apparently, setting permissions is easy to do with Filezilla. But do I REALLY have to learn yet another program?? Can't this be done through DW 5? It just seems hard to believe that there isn't a way. Does anyone know???

    I really appreciate the answer, but... it doesn't work. And that actually is a good example of the entire problem. When I try to switch to Remote View in the Files Panel, all I get is the same message that says:
    ""An FTP error occurred. Cannot open server folder ourblog.greenhillslawnandgarden.com. Access denied. The file may not exist, or there could be a permission problem."
    So there's no way to even get to a view where I *could* set permissions. Is there any way out of this mess??

  • What files need to be backed up to make sure film project is safe?

    Editing a feature film using Premiere Pro, Audition, Speedgrade, and possibly After Effects?  My question is what files do I need to backup to make sure the film project is safe in the event that the computer and hard drive both break.  Editing on a computer, with footage stored on external hard drive.  Will use a separate 2nd hard drive for the files to be backed up.
    I know I need to backup the .pproj Premiere pro files backed up.  I know I need to backup the footage shot (both video and audio files) backed up.  I recently learned that I need to backup the files created by Audition, when I send an audio clip from Premiere to Audition and back to Premiere for audio editing.
    So my question is this: what other files need to be backed up?  If I round trip to from Premiere to Speedgrade and back to Premiere, is there a file created that I need to back up?  If I do a round trip from Premiere to After Effects and back to Premiere is there a file that needs to be backed up?  Are there any other files that need to be backed up?
    My goal - back up all files needed, so if I need to resurrect the project after computer and hard drive break, that I will have all files necessary to continue editing, and that no footage, or edits, or color corrections, or audio edits will be lost at all.
    Thanks in advance.

    Hey there Matt, nice to "see" you here too!
    I can answer one question directly: when round-tripping PrPro/Sg/PrPro, the only place Sg files "changes" is back in the PrPro project file. Essentially, its designed to function much like perhaps a plug-in "within" PrPro. So that part is one of the nifty things of the Direct-Link PrPro/Sg. Now something I'm curious about in your request is how the other folks with LARGE project back things up whilst working. I know they do not archive the previews & cache, but ... with a large project ... can/does it save time to backup those files also when you do get a crash/corrouption. Is it faster to get back working if you backup the cache/previews?
    You note wondering where to store the outputs of Audition work-sessions. I put them in the "main" projects folder-tree. I know others feel this is "content" and put them in with the video/graphics folder-tree. I started doing it this way, but now ... wonder if the other is "cleaner" though the difference may be more of intellectual curiosity than having any actual affect on diddly. Note, as I've got separate discs for each part of vid work ... programs/system, cache & previews, projects, footage/graphics, renders ... that does influence having separate folder-trees per project on separate drives. If the project & content files are all on one drive, well ... that's simpler to backup/archive.
    Video projects are so space-hogging these days ... "footage" just gets bigger you know! ... and projects more complex. Planning for both in-work backups and continual movement of material from project inception to archiving it off the "working" station is a must, as you are clearly aware. There are many different layouts folks have chosen or simply need to use for their workstation disc layout. This can have some effect on project "stage" planning also.
    For those with a "hot" workstation with say a 4/5 disc RAID system for projects/footage/previews/cache so everything is on one big "system", I suspect everything can just live in appropriate folders under a project name to begin with. Backups and Archiving is pretty simple ... use a good backup program to copy & CHECK the the project master folders with sub-folders to your backup/Archive option/s, then delete off the working system (when Archiving).
    And as noted here, there, and elsewhere ... putting all the "project" files & their assorted bits & pieces in one main folder per project, and then all footage/graphics/etc. "content" material in a joint folder-tree on the drive *that* lives on for working purposes make backing up & archiving/storing things much simpler. I've seen all sorts of things done afterwards but the simplest just seems to be collating the "project" files folders and the "assets" (content) files/folders under a general project name folder

  • Set Permissions problem with DW

    Is there an issue with DW (I am using DW CS4) setting permissions for folders or files? I tried setting permissions to a couple of files in DW by right-clicking the file. The File Access Properties dialog box appears, I set permissions, click OK, and assume the permissions are set. But when I check the permissions again by right-clicking the file, none of the permissions I set remained set according to the dialog box. So, I have been setting permissions using Cpanel. After setting permissions for files in Cpanel, I double-check the permissions and they seem to be set. Then going back to DW, the permissions are not set according to DW's File Access Properties dialog box.
    Can anyone enlighten me on this situation?

    Is there an issue with DW (I am using DW CS4) setting permissions for folders or files? I tried setting permissions to a couple of files in DW by right-clicking the file. The File Access Properties dialog box appears, I set permissions, click OK, and assume the permissions are set. But when I check the permissions again by right-clicking the file, none of the permissions I set remained set according to the dialog box. So, I have been setting permissions using Cpanel. After setting permissions for files in Cpanel, I double-check the permissions and they seem to be set. Then going back to DW, the permissions are not set according to DW's File Access Properties dialog box.
    Can anyone enlighten me on this situation?

  • Advanced Search (Ctrl+Shift+F) broken with Protected View = All Files Adobe Customization Wizard XI

    I've updated Adobe Reader to version 11.0.09 and it was discovered that the Advanced Search (Ctrl+Shift+F) reports back errors on all words searched inside PDF document/
    Reproduce:
    1. Use Adobe Customization Wizard XI
    2. Create a MST file for the Base Adobe Reader 11.0.0 MSI (AdbeRdr11000_en_US.msi)
    3. Under Security -> Protected View -> (Set to ALL FILES)
    4. Save MST file
    5. Install Adobe Reader XI using created MST File and then Install AdbeRdrUpd11009.msp
    6. Open any PDF document and search for words using advanced search: (Ctrl+Shift+F) All searches return errors unable to display search.
    The error can be reproduced and only occurs on Adobe Reader 11.0.09. None of the previous patches of Adobe had this issue.
    The fix actually requires to remove and re-install Adobe Reader but with Protected View=OFF
    Please can you confirm bug and report any solution or workaround so that Advanced Search works with Reader 11.0.09?
    Thanks

    Hi vmartin01,
    I tried to check at my end and it works fine at my end.
    Regards,
    Ajlan Huda.

  • Error setting permissions for emwebsite during install

    Fisrt I am new to Oracle and this is my first attempt at installing or using an Oracle product. I am installing Oracle 9i standard edition onto a Redhat 7.3 server. At the 88% completion mark the install script fails with the following error (from the log):
    Exception thrown from action: copyExpandedGroup
    Exception Name: SetFilePermissionException
    Exception String: Error in setting permissions of file/directory /home/oracle/Or
    aHome1/bin/emwebsite
    Exception Severity: 2
    1. How severe is an Exception Severity 2? Can I safetly ignore it?
    2. When veiwing the /home/oracle/OraHome1/bin/ directory the file emwebsite(.html?) is not present. I assume that this is why the permissions can't be set. Can I just import the file from another location or from the .jar files and continue?
    Any help will be greatly appreciated.

    I forgot to post my code:
    Context context = new InitialContext();
    Object objref = context.lookup("MyHome");
    TopicHome home = PortableRemoteObject.narrow(objref, MyHome.class);
    // this is where the exception is thrown       
    Collection records = home.findAllRecords();

  • How to set all file permissions to default?

    So a few background notes are in order. I came across an article on the NSA's website titled Hardening Tips for Mac OS x 10.6 "Snow Leopard", needless to say I have come to believe I have made this irreversible. The NSA suggested to do some fancy command line coding to disable this, modify that, and change permissions to this. After hours spent on "hardening" my system, I have little hair left to pull in frustration. Is there any way to restore all file permissions back to default? I have used the Repair Disk Permissions, but that has done very little. To give the scope of what permissions have been skewed, I have observed several things:
    The desktop wallpapers, on all Desktops (as I'm in Lion 10.7.3), start from the same picture every time. I have the wallpapers changing, randomly, every 5 minutes.
    Safari doesn't keep the home page. No matter how often I try to change the homepage, I restart Safari, and I'm right back to the original homepage.
    Firefox doesn't retain the fact that I want it to be the default Web Browser. In fact, it keeps "forgetting" that I've used it before, and thus brings me to their awesome start page whenever someone first uses Firefox.
    Spotlight gets "stuck" i.e. almost every time I start my machine, it indexes. Even after I let it finish indexing, the next time I start my computer, it starts again.
    I have to input the administrator password after almost every activity, such as copying to the desktop, moving an application not bought from the Mac App Store into the /Applications folder, deleting a file from anywhere inside my home folder, etc.
    Some preference panes that need access to certain folders, such as Hazel's access to my desktop, are denied that access without ever prompting me for a password (though even if it did, it would get rather annoying after every startup)
    My firewall (in System Preferences>Security & Privacy>Firewall) doesn't "remember" that I do indeed want Dropbox to accept incoming connections. I have to input my admin password at each startup after clicking "allow"
    Opera pretty much doesn't function. Its bookmarking capability, home page, saved tabs, any thing that requires the saving of any type of preference to the computer results in a dialog pop up informing me that Opera failed to save what it needed, and prompts me to "Try again" or "Cancel" (hint: the "Try again" button doesn't work)
    There are more symptoms of an ever growing problem.
    I have backed up my machine from Time Machine, but I think it retains these file permissions, unless I'm wrong.
    Summary:
    How can I fully restore EVERY file permission back to default? Repair Disk Permissions doesn't work
    Is there a way that I can re-install Mac OS X, restore through Time Machine, and achieve the default file permissions, essentially losing all file permissions?

    Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.
    Launch the Terminal application by entering the first few letters of its name into a Spotlight search. Drag or copy – do not type – the following line into the window, then press return:
    chmod -R -N ~
    If you get an error message about permissions, enter this:
    sudo !!
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

Maybe you are looking for