Mkdirs() creates read-only directories

In my application I have a piece of code that creates directories with mkdirs(). So far, so good.
But after that, I want to copy a file to one of the (sub)directories. However, the directories are all read-only, so I get a runtime error:
java.io.FileNotFoundException: (Permission denied)
Because the directory is read-only, I cannot copy files to it, right? If so, how can I solve this? I understood there's a command called setReadOnly for File objects, but setting it to false didnt work.

What are you doing to get this exception? Some code might help.

Similar Messages

  • How to create read only disk image?

    I used to be able to create read-only encrypted disk images with Disk Utility in Mac OS 10.4.x (Tiger). In the Leopard version (10.5.7) of Disk Utility, the 'read only' option seems to be gone (but I can still do encryption). Does anyone know how this can be done?

    A blank empty read only disk image has never been possible. If it's read-only, it cannot be modified, and so it would be blank and empty forever. Not much point in that.
    If you want read-only and encryption on your finished disk image, you'll have to put your files into a folder, and then do File -> New -> Disk image from folder.

  • Is it possible to create read-only users in OM

    We have several tasks where creating Read-Only access for non-OM users who require information from specific data fields in OM on a regular basis would be helpful. Currently those users must interrupt the daily work of those Oracle users with OM access in order to get their queries answered; obviously this can be quite disruptive.
    Have been told by our IT dept/OM users that creating read-only users is not possible and have not found any general information about the topic via Internet search, so I am posting this general query.
    Are there license issues that would prevent this?
    Security issues?
    Customized OM?
    Or is it just too complex to do without creating headaches for a firm's IT department?
    Thanks
    Lisa

    You will have to create new functions with parameter query-only = Yes.
    And then create a new menu with those new functions.
    And then attach the new menu to the Read only responsibility.
    Also see Re: How to change OM responsibility as read-only in oracle applications 11i and the links in that thread.

  • How to create read only Apex items

    Hi,
    I'm creating a report using Apex items to display the result values inside editable text boxes. They are then referred by using APEX_APPLICATION.G_F02 etc.
    My requirement is to make the last row of this report (the values for "Total") as non editable or read only. Can anybody help me with the code that i would need to add in the query? The query goes something like this:
    apex_item.text(7, TO_CHAR(nvl(year_4,0),'999,999,999'), 12, 12, 'style="text-align:right;font-weight:bold"',ROWNUM) "YEAR_4", ..

    Surprising. I would have expected there to be a CSS style to disable a form item.
    Depending on your reasons for wanting to use APEX_ITEM, you could:
    Select your required value as part of the query (without using apex_item.)
    Visit your report attributes, then the attributes for your specific column.
    Change the column type to text field.
    Add readonly=true into the item attributes.
    Rgds
    Ben

  • Shared Computer over Ethernet is creating read-only files and folders

    Hi,
    I have set up a ssecond mac connected to my G4 via ethernet connection. We are both using my mac as the main computter and both working from one folder on it. BUT when the second computer creates a folder or saves a job into this folder the permissions are set for them to 'read only'.
    How do you make it so whatever they create is all read and write.
    The second mac is logining is not as the administrator but as a normal user. I do not want them to have full access.

    Hello DH-Studio
    Hi, this is still causing me problems, is there another way?
    Sharepoints does work howerver the other way to do this that does not involve using UNIX commands is to run Server Software such as Mac OSX Server.
    The 10 User licenced version is affordable and it has an excellent GUI called the Workgroup Manager which can setup sharepoints, users & groups permissions very easily. It has many other benefits.
    Other than that their are UNIX commands such as umask. However I have no experience using umask and I understand it make global changes to your system. I would avoid using it.
    You also could setup a crontab rule that changes the permissions on the shared folder every minute. In your terminal use the following commands
    sudo nano /etc/crontab
    You will then see
    using your arrow key move the cursor down to area indicated in my example then enter the following information
    */1 <press tab twice> * <tab> * <tab> * <tab> * <tab> root <tab> chmod -R 777 /shared
    it should look like the following
    replace "/share" with the actual path to your sharedfolder
    Then close the file with "control +O", then "return" then "control X"
    Now any file that is saved to your share folder will be readwrite to everyone every minute. This is a clumsy method but it works.
    iBookG4 1.33ghz. 20inch iMacG5, 1.2ghz Mac Mini, ipod video, iSight   Mac OS X (10.4.3)   Linksys WRT54gs+1.05 Talisman Firmware, Telewest 10mb/384k

  • I only create Read Only folders can't set permissions for any file but mine

    My issue is I have 25 users and an X-Serve and it seems like all the users
    do not have the same permissions. More specifically if a user creates a
    folder on the server only that user can access it. This is the same if the
    user creates the folder on there desktop and then copies the files to the
    server. But if they copy a "read only" folder or file (this happens more
    with files) to there desktop and then they open the file save it and place
    it back on the server there is no problem.
    I also, have a user that whenever she creates a folder it automatically
    set's itself to read only. No matter whether she copies from her desktop to
    the server or visa versa. Every folder she creates is protected this way
    here settings are all the same as everyone else. So I'm not sure if she is
    unique or if the settings for my users are incorrect.
    I did not set up the server or the user's so I'm really trying to catch up
    quick. We are really suffering in that it totally slow's things down almost
    to a crawl in some cases. I really hope you can help me out with this I've
    attached some screen shot's and the X-Serve system profiler for background.
    --

    I suggest posting to the Xerve forum http://discussions.apple.com/forum.jspa?forumID=854

  • Create Read Only User in Oracle 10.2.0.4

    Hi., Friends,
    I want to create an user in Oracle 10.2.0.4 with read only rights of my hole database. I am not having Enterprise Manager Console so i want create from command prompt.Can u please explain me the step for create and assign read only role to user.
    Regards
    Mahendran

    Hi Mahendra,
    I am happy with Surendrajain's reply, but with this sql you will not able to view the data present in SAP Schema,
    The entire sql query with the comments in bracket  is given below
    1) create user PPMTEST identified by program1;    
    2) Create role PPMROLE;                           {  PPMROLE is the role name which will be later assigned to the user PPMTEST}
    3) Grant CONNECT to PPMROLE;                                 { CONNECT role allows the user to connect to oracle database}
    4) Grant SELECT_CATALOG_ROLE to PPMROLE;       { SELECT_CATALOG_ROLE role allows the user to view the oracle data dictionary}
    5) GRANT SELECT ANY TABLE to PPMROLE;             { "SELECT ANY TABLE" privilege allows the user to view the table which is present in the SAP schema}
    6) Grant PPMROLE to PPMTEST;                                         { Assigning the role PPMROLE to the user PPMTEST}
    7) COMMIT; 
    Thanks and Regards
    Debdeep

  • Execute "Save As" on PDF Form open, Create Read-Only

    I need to create a read-only version of my form so that I can protect the original, so I thought that I could put a app.execMenuItem("SaveAs"); as a new document script to force the user to save as when they open, but it seems to not be working. The file is in a shared dropbox folder, so just a simple read only is not going to work. Is there a better way to achieve what I am doing, or do I just need to change my code?

    Oh man! I was really hoping that wasn't going to be the case! Thanks a lot man, I appreciate the help!
    I'll leave this forum open for another week, maybe someone else has something experimental to try, thanks everyone!
    -tech_geezy

  • Creating read-only calendars for syncing

    How can I create a read-only or protected calendar?
    Is it possible to create a calendar which, after syncing with the family computer, would be read-only, protected or non-editable, by the family computer user?
    Thank you,
    cj

    You're mixing metaphors here: 'publish and subscribe' and 'synchronize' are two independent processes. You can do both, but most users generally limit sharing calendar information to one or the other.
    Publication creates a read-only, public object to which others can subscribe if they know your calendar URL. Calendars can be published on .Mac or on a private WebDAV server.
    Synchronization allows the sharing of calendar data in read-write fashion across multiple machines or devices, generally for a single user. Groups can, to a limited extent, share such data with a .Mac family pack, or can use SyncTogether to share data among mixed workgroups, on a single machine among multiple users, across a subnet or over the internet.
    How you enable these technologies depends upon what you want to achieve. If you want a calendar to be viewable by someone but not editable, then you publish it and let them know that they can subscribe to it. If you want someone to be able to edit one or more calendars on a selective basis, then you use SyncTogether to synchronize them by allowing another user read-write access to a collection (but not necessarily all) of your calendars.
    You are starting at the head end of the process and attempting to configure these tools to offer services. What you need to do is just the opposite: determine what outcome you want to achieve, then configure one or more of the technologies to support that specific outcome. With SyncTogether, you can do that on a different basis for each synchronized user in your workgroup.
    Publish only if you are willing to let non-editable data exist publicly. Subscribe if you want read-only access to one or more calendars. Synchronize if you want multiple users to be able to add, change or delete event and task data.

  • One of our Macs creates read-only files.

    We've got five macs on a network, using open directory on a Xserve. In Workgroup Manager the settings for all the Macs are identical. Four of the macs work fine, but any file created by the fifth machine has read-only preferences for the other users, regardless of who's logged in.
    Any ideas what's going on?
    Steve

    Sorry, forgot to mention we're on XSan 1.4, OsX 10.5.6, all the Macs are Intel.

  • Does anyone know a simple way of creating read-only DMGs from card media?

    We're looking for a simple workflow to copy/archive card media from cameras.
    Can anyone recommend a utility / Droplet / Applescript that will create a read-ony DMG directly from mounted card media?
    Preferably something where the disk name of the DMG can be set when its created.
    Thanks!
    Nick

    Thanks! That's a handy start.
    I'll take a look at the command line options of hdiutil. Ultimately, we're looking for a workflow for non-terminal users so I imagine we'll wrap it up in AppleScript.
    The idea is to make a simple drag+drop process for people shooting digital video to archive card media as read-only  dmgs with custom reel names. Something like...
    - select the card/folder (or drag onto AppleScript)
    - enter name and location of dmg in file dialogue
    - create and verify dmg
    Cheers
    Nick

  • A question about creating READ ONLY users.

    Dear all,
    I have a question about read only user accounts and I would appreciate if you could kindly give me a hand. I have a schema named SCHEMA1. Whenever I want to connect by using sqlplus I run the following:
    sqlplus user1/[email protected] SCHEMA1.WORLD is the entry in the tnsnames.ora referring to the schema SCHEMA1.
    I need to create a read only user who is able to SELECT all tables and views created by user1 on SCHEMA1 (this user will not modifiy anything at all. The user is used only for a person using SQL queries to read data). for several tables I write the grants explicitly, for example:
    CREATE USER user2 IDENTIFIED BY user2;
    GRANT CREATE SESSION to user2;
    GRANT SELECT ON S001_COR_ECLASS TO user2;
    GRANT SELECT ON REF_ECLASS511 TO user2;Is there anyway to do the same thing but for all the tables (because there are a lot of tables and views)? Besides, even with these granted permissions when the user connects with SQL Developer to the database, he is not able to view the list of tables/views in SQL Developer GUI. What causes this problem?
    Thanks in advance,
    Dariyoosh

    Hello Dariyoosh,
    he is not able to view the list of tables/views in SQL Developer GUIyou can either go to "Other Users" - user1 - tables. There you see every table you have permission to select.
    Or you can create a synonym in schema2 for each table in schema1 and set a filter on the tables node of user2 "Include synonyms".
    Regards
    Marcus

  • How to create read only properties in a component?

    I want to set a property in a nucleus component of global scope as read only, so that it cannot be set via dyn admin. I want this property to be set only via properties file at server startup. I tried removing the setter method as suggessted in the guide. But what happened was the property was not set with the value in the properties file and was set as null. It did appear as read only in dyn admin, but part of my purpose is still not resolved. Any help/info for setting the value from properties file alone and restricting thro dyn admin is appreciable.
    Thanks,
    Gopinath Ramasamy

    You may also try this in your component class by overriding doStartService() which will be called once the component is initialized with property setter has already been called:
    import java.beans.PropertyDescriptor;
    import java.beans.IntrospectionException;
    import atg.core.util.BeanUtils;
    import atg.nucleus.GenericService;
    import atg.nucleus.ServiceException;
    public class MyComponent extends GenericService {
          private String x;
          public String getX() {
              return x;
          public void setX(String value) {
              this.x = value;
           public void doStartService() throws ServiceException {          
              try {
                            //make property named "x" as non-writable
                   PropertyDescriptor pd = BeanUtils.getPropertyDescriptor(this.getClass(), "x");
                   pd.setWriteMethod(null);               
              } catch (IntrospectionException e) {
                   //handle exception
                            logError(e);
                            e.printStackTrace();
    }I think it should make the property "x" rendered as read-only in dyn/admin after it has initialized through properties file.
    Update: I have tried it in an existing ATG 9.4 setup and it was working as expected.
    Edited by: Nitin Khare on Aug 14, 2012 9:01 PM

  • Read only rights Personal directory

    I'm using cucm 9.1. I want to give Read only rights on Personal directory to some of my IPT users.
    How can i acheive this in CUCM 9.1.
    Regards

    That's not an option with personal directories; they are always editable by the end user account. You can use ecosystem partner products (or your own coding if you're so inclined) to create read-only directories and then subscribe these to the phone(s) that you want to see that custom set of listings.
    To be honest, at very small scale you could just write the XML flat file in accordance with the XML SDK, create a phone service with the URL to that XML file, and subscribe a single phone to it. Anything more ellaborate than this just makes it easier to maintain at scale.
    Please remember to rate helpful responses and identify helpful or correct answers.

  • Read only user creation for Oracle EM Console 11.1.1.5

    Dear All.
    I have created Read only user for Oracle EM Console.
    I have followed below link to do the same
    http://moshe-soa.blogspot.com/2011/09/blog-post.html.
    I have noticed with read only user is that TEST button in EM Console is active means user with read only user can create a trans, in Prod scenario it is a risk.
    Raised a CR with Oracle and found that it is a bug
    Bug 14082464 - CANNOT DISABLE TEST/TEST WEB SERVICE BUTTON IN SOA EM COSOLE is there in Metalink.
    So my question is there any way by which i can disable the TEST button in EM Conasole.
    I think there are some WLST script or servlet java class available to resolve this issue.
    Can any one confirm this and please suggest if any one aware of any alternative method.
    Thanks,

    Hi, have you got any solution to this problem? I am having exact the same issue in 11.1.1.6.

Maybe you are looking for