Changing the owner of a file

Sir,
I have a program which executes this command (touch filename) using Runtime class.When the program is executed the file is created with root as its owner.I tried to change the property using the setProperty("user.name","temp") method of System class.But still the file has the root as its owner.Is there any other way to do this.
Thanks
Mouli
I

You're using Unix, right?
Have you tried using chown throug runtime to change the owner?
Can't you make file from Java code without needing
Runtime class? I don't know about this, I've been
working with C and Unix for too long, but can't you open
a stream to file and then close it? That way you'll
have an empty file, and the owner might be the one,
who executed the Java program.
kari-matti

Similar Messages

  • Changing the owner to multiples files...

    Hello, How Can I change the owner to multiples files.
    Now I am doing this one by one with properties option (webui).
    Win2000
    iFS 9.0.1
    Thanks a lot,
    Sandra

    The JAVA API would be a good start. Simploy construct a search for the appropriate documents, then recurse through the SearchResults and apply your changes.
    Matt.

  • Proper way to make bulk changes the Owner ID, Path and file share credentials for my existing subscriptions, ExtensionSettings

    We are going through with an upgrade/migration to SSRS 2012 and moving everything to a different domain. We have about 200 active subscriptions running, the reports are being delivered to a file share.  What is the correct way, in bulk, to change
    the OwnerId, the Path and the FileShare Username password credentials for these subscriptions?  I see these values are being stored in Subscriptions > ExtensionSettings.  I see that the file share path and Owner wouldn't be a problem to change,
    but since I see the file share credentials are encrypted I would not be able change them directly in ExtensionSettings.  Anyone know the proper way to change the Owner ID, Path and file share credentials for my existing subscriptions without having to
    change each one of them manually in the report manager?
    Note: Reporting Services Native upgrade from SSRS 2005 to SSRS 2012.
    Thanks in advance.

    Hi Cygnus46,
    Based on my understanding, you want to change the Owner ID, Path and file share credentials for all existing subscriptions.
    In Reporting Services, the subscription information are stored in the Report Server database. In your scenario, you can go to report server database and run the query to list all the subscriptions, then modify the owner and fileshare paths in the subscriptions
    table. For more information, please refer to this article: Tip: Change the Owner of SQL Reporting Services Subscription. If you want to change
    the file share credentials for subscriptions, you can run the query provided by
    wiperzeus from this similar thread:
    Windows File Share Delivery/ SSRS 2008 R2.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • How do you change the owner of a folder?

    Hello,
    I'm having a very difficult time finding an answer to this question. I have a brand new xserve (10.5.2) up and running fine with a single web site with wikis and blogs enabled. I can get to the web page and the wikis with no problems.
    The problem is, the default folder for the web home page and the wiki information are on the system drive. I need to have those folders on another partition. I created a folder called /Collaboration and one called /Webdocs on the partition on which I need these folders.
    When I put a copy of index.html into the webdocs folder, the web site shows up fine in a browser window. Wikis show as being "disabled" though. The folder for the wiki files has me as the owner since I created it. I've read on a few posts in these forums that the owner of that Collaboration folder needs to be "teamserver" however, I am unable to change to that using Get Info, like I could with a Tiger machine.
    Could someone please tell me how to do this? Thanks.

    I've got a similar problem:
    I'm attempting to follow the directions in the Upgrading and Migrating Guide for Leopard. The Mac has two hard drives in it. Batman contains the active server running 10.4.11. Magic is the hard drive that will run 10.5.2.
    Since I'm moving from one hard disk to another (as opposed to an entirely different Mac), things ought to be fairly easy. But not for me. ;(
    What I'm trying to do: Migrate the mail database. (I have managed to import users and groups; only the mail service will run on this machine.)
    Problem: I can't change the owner and group settings on the various files in the var/imap and var/spool/imap folders (for example, so that they are owned by system or _cyrus, with group wheel or mail and everyone set to read only).
    The owner and/or group often shows up as unknown (which is to be expected with the migration to a different hard drive). But how can I change these permissions?
    Or is there a way to use a command to copy them from one disk to another? I tried ditto, but didn't get the syntax right (the files were copied to the same level as the imap folder rather than within it) and now I have a bunch of files owned by nobody that I can't delete because I can't change the owner.
    TIA,
    mm

  • When upgrading I changed the owner of everything.

    When upgrading my Mac Pro (quad core Intel Xeon) I changed the owner name, and subsequently lost 12 years of mail archives. I have accepted that loss as a result of my stupidity. Now here is my question: Is there a way to universally add my new adminitrator (dougjacobson) as owner of all folders, files, apps, etc.? I am the only user on the Mac.
    Thanks for any insight into using the command line.
    Doug

    I don't have time to write something comprehensive and bulletproof, but here goes...
    First, make a copy of one of the folders you want to recover, and practice on that.  Once you're confident that you know what you're doing, do it on your real data.
    The commands that you're looking for are "chown" and "chgrp", which change the owner and UNIX group of the targetted files.  You can read about these by typing "man chown" and "man chgrp", or just Google them.
    The main option you will provide to these two commands is the -R flag, which means that it will be applied recursively to the contents of a directory, not just to a single file/directory.
    eg: "chmod -R jakesan your_mail_folder/"
    You may need to prepend the "sudo" command ("man sudo" for more details):
    eg: "sudo chmod -R jakesan your_mail_folder/"
    Good luck!  (sorry, I may not respond to follow-up questions)

  • Error while changing the owner of an object in Discoverer

    Hi All,
    I have a problem in Discoverer folders.
    I have a folder whcih is based on a view in schema in A, now i have created the same view in schema B and want to change the owner of the view in Discoverer to B.
    But when i do that it gives me an error as -
    'An error occured with the darabse transaction because the underlying object has been changed'
    I am not able to understand this.
    If anyone can help me this it would be really helpful.
    Regards,
    Shruti

    Well, this is something not talked about in the Administration training class. My hunch is that you are trying to do something that Oracle never intended you to do. I think when you edit the folder and want to change the Owner property, the idea maybe is that you are trying to change the owner on the original table. Here you have said that you recreated the view in schema B (so technically a different table object). But in Discoverer you are still dealing with the view in schema A as the basis for the folder, not the view in schema B. Though I would think if you can see the new owner's name in the database/user list and thus can pick it, it should let you change the owner property, even if that may not be quite what you intended. Discoverer does store things under the cover (such as unique ids), so maybe something is going on that is not visible. My suggestion would be to open up a service request with Oracle support on this. The idea of dropping the folder and then readding it may be okay, but that would be something you would want to test in some kind of test environment and see what happens (not sure what impact that may have on workbooks using the original folder). Of course it may be possible that you have uncovered an Oracle bug.
    John Dickey

  • What is the procedure to change the owner of the BW jobs.

    Hi Gurus,
    Version- BW 3.5
    I need to change few jobs Owners which are collected from the SM37 from a individual User to generic account(ALEREMOTE).
    Will any body help me out with the procedure to change the owner of the BW jobs.
    Thnaks in advanace..
    With Regards,
    MBS

    in SM37, take all release jobs by giving JOb name as "" and user as "".
    When you get the release job details then follow the steps.
    1. Select theJob --> Menu Bar --> JOB --> Change --> here you will get the details of the job and Clieck on STEP just above the job name.
    In the next screen select the job and click on Change ICON.  here you can see the user name in change mode and you can update the user to ALEREMOTE. And then save the job.
    Once done then the job will be on the new user.
    Hope this helps..

  • How to change the Owner of a Process

    We have a Business Process Flow and the owner is someone no longer with our company. Not finding a way to change the Owner on the process. Does anyone know how to accomplish that?

    Hello,
    Try following:
    Open CRM -> Settings -< Processes -> Select BPF -> Click Assign at toolbar, select user and click OK.
    Dynamics CRM MVP
    My blog

  • Change the name of a file.

    Hello, I don't how can I change the name of a file ?.
    Somebody can help me, please?
    For example : c:\out\prove1.csv to  c:\out\prove1_09112007_163001.csv
    Thanks

    Another way would be to use the FILE_COPY and
    FILE_DELETE of the class CL_GUI_FRONTEND_SERVICES to first copy the file and then delete the other one.
    REgards,
    Rich Heilman

  • How can i change the size of PDF files ?

    how can i change the size of PDF files? when i convert documents in the acrobat browser it seems the files become larger then normal pdf files, this is, i compare with other files that people send to me and i realise that they are smaller than my converted files, even if they have more pages.

    A lot depends on the form of the PDF. Is it graphics, a scan of a text file, pure text, or other? What version of Acrobat are you working with.
    You can do a save as to get a WORD file, but do not expect great results. The ability to get a decent WORD file depends on what the form of PDF you are working from. If it was created from WORD with tags and all, you might get good results. If not, you might get a lot of messed up results.
    Explain what you are starting with and your ultimate goal. Also check the audit of the file (should be under PDF Optimize) to see where the file information is concentrated (text, fonts, graphics, other).

  • BEx Brodcaster for Workbook - Cannot change the name of attachment file.

    Dear All Experts,
    I am using the BEx Broadcaster to distribute report of workbook via email. The name of attchament file in email is the technical of workbook. I want change the name of attchment file and found this thread
    [Broadcasting Workbook - Change attachment filename|Broadcasting Workbook - Change attachment filename] that reference to method in background process. Can I create customize program or method to change the name of file.
    Thank you and really appreciate your help.
    Zilla D.

    Hello Zilla,
    By SAP methods, this is not possible. There is no way to do that. May you can suggest it on our Community of Innovation. See note 11.
    This is not only your concern. Some customers already request this functionallity.
    Best Regards,
    Edward John

  • Changing the setting from PDF file to a  JPEG file.

    Is there a way I can change the scan setting on my printer. It is a HP Deskjet F4480. I want to change the setting from PDF file to a JPEG file. I want to scan them so I can see them on my screen saver.

    This has nothing to do with Acrobat. See the documentation for the scanner software that came with your scanner.

  • Change the layout in a file of pages

    Can I many times over change the layout in a file of pages? With the old version (pages09) it was possible....

    Hi elirusconi,
    elirusconi wrote:
    Can I many times over change the layout in a file of pages? With the old version (pages09) it was possible....
    I don't know what layout you mean was possible to change in Pages '09. Please explain.
    More information will lead to a solution .
    Looking forward to your reply.
    Regards,
    Ian.

  • HT201304 How can I change the account card on file to a different card?

    How can I change the account card on file to a different card?

    HT1918 iTunes Store: Changing account information
    Learn how to change your name, billing address, email address, and credit card information for your iTunes Store account.
    Note: If your previous payment method was not accepted, you can edit your payment type or credit card information by following the steps in this article.
    You can change all of your account information from the Apple Account Information page. To get to the Apple Account Information page, follow these instructions:
    Changing your account information using a computer:
    Open iTunes.
    Choose Store > Sign In.
    Enter your Apple ID and password, then click the Sign In button.
    Choose Store > View My Account.
    Enter your account password, and click the View Account button.
      To update your email address, follow these instructions: 
    From the Apple Account Information page, click the Edit button to the right of your Apple ID.
    Enter your new email address into the Email Address field.
    Click the Done button.
      To update your name, billing address, or payment information, follow these instructions: 
    From the Apple Account Information page, click the Edit Payment Information button.
    Edit the information that you would like to change.  Note: The payment methods that the iTunes Store accepts can be found in the payment type section. If you do not want a payment method on your account, select None in the payment type section.
      Click the Done button once you've updated all of your information.
    Changing your account information using an iOS device:
    Tap Settings on the Home screen.
    Tap iTunes & App Stores.
    Tap on your Apple ID. (If you are not signed in, enter your Apple ID and password, and tap Sign In.)
    Tap View Apple ID.
    Enter your Apple ID password.
      To update your email address, follow these instructions: 
    In the Edit section, tap the Apple ID field.
    Tap the Apple ID field.
    Enter the email address that you would like to be your Apple ID.
    Tap the Done button.
      To update your name, billing address, or payment information, follow these instructions: 
    In the Edit section, tap Payment Information.
    Update the information that you want to change.
    Tap the Done button when finished.
    Additional Information  Notes 
    If you use an AOL screen name to sign in to the iTunes Store, editing your information on the Apple Account Information page will not carry over to your AOL account. If you need to update your AOL account information, contact AOL.
    If your account information does not match your credit card, you may get a message stating "The credit card was declined."
    When you update your credit card number or billing address through the iTunes Store, any equivalent information you might use with iCloud, Apple Store online, iPhoto, or Aperture is also updated.
    The iTunes Store will place a minimal authorization hold on your credit card each time that you update your account information (equal to around 1 USD). The authorization hold is not a charge. The authorization hold is placed on your credit card to make sure that the information provided matches the information on file with your financial institution. The authorization hold will not be displayed in your iTunes Store purchase history.
      Important: Information about products not manufactured by Apple is provided for information purposes only and does not constitute Apple’s recommendation or endorsement. Please contact the vendor for additional information.
    Last Modified: Sep 24, 2012

  • Question on changing the owner of spatial datatype

    create table test4 (
    COL1 NUMBER(38) NOT NULL,
    COL14 SCOTT.SDO_GEOMETRY
    ) TABLESPACE USERS;
    SQL> select table_owner, table_name FROM all_synonyms where synonym_name='SDO_GEOMETRY'
    OMETRY';
    TABLE_OWNER TABLE_NAME
    SCOTT SDO_GEOMETRY
    I want to change the owner of SDO_GEOMETRY to MDSYS. I know re-creating the table like "COL14 MDSYS.SDO_GEOMETRY" will get what i'm
    looking for but is there a way to ALTER the table to achieve the same without re-creating it?
    Thanks,
    Rajesh

    user11919950,
    . . . .If you're just messing around on a test machine, then give this a spin:
    -- "Identify obj# in table named obj$ for SDO_GEOMETRY owned by MDSYS
    select
       obj#,
       t.OBJECT_NAME,
       u.USERNAME,
       o.OWNER#
    from       sys.obj$ o,
       dba_users u,
       dba_objects t
    where      u.USER_ID = o.OWNER# (+)
    AND o.name = 'SDO_GEOMETRY'
    AND o.owner# = 46
    AND o.obj# = t.object_id;
          OBJ#   OBJECT_NAME  USERNAME   OWNER#
         45779  SDO_GEOMETRY  MDSYS      46
         48788  SDO_GEOMETRY  MDSYS      46
    -- "identify owner#/user_id for SCOTT"
    SELECT user_id FROM dba_users WHERE username = 'SCOTT'
       USER_ID
            54
    -- "Change the username of one,both of those records from MDSYS to SCOTT"
    -- "NOTE: untested SQL, but if it fails, just edit the table in Oracle Enterprise Manager"
    UPDATE obj$ SET owner# = &ScottUserID WHERE obj# = &ObjNum;
    COMMIT;
    {code}
    I've temporarily changed obj# values in this obj$ table to break associations between oracle objects that were throwing errors. I used Oracle Enterprise Manager's "view contents" form to view the obj$ table and to make those changes. See {message:id=4596120}
    Cheers,
    Noel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Exit code 6 installing CS6 Design and Web Premium on Win7 Ent 32-bit

    Hi all, I got the following error during setup. Any hint? Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DW050 ... WARNING: DW024, DW066 ... -------------------------------------- Summary --------

  • Purchase requistion number and line item number linkage with work order opr

    Hello, I want to know what is the link between Purchase requisition number along with its line item number with work order operation number. For the non stock component assign to Work order operation ( say operation 10) the PR get generated for that

  • Please outline in steps for me...

    I have a presentation that will be presented to my class over a drop down projector thing. I will tap into it via vga plug. I have not yet tested it yet, only on my mac. Questions... 1) Will the presentation be fullscreen? When I press the play butto

  • HELP! Won't boot update of 10.6.5

    I just installed 10.6.5 on my 13" Aluminum Unibody Late 2008 Macbook up from 10.6.4 and now my Mac side won't boot up (I have a windows side that I have to select by holding down option when the white screen comes up). What happened was, I installed

  • Startup disk full won't get past log on screen

    I got the error message that my startup disk is full. I tried to turn off the computer and turn it back on but now on startup it wont let me past the password screen. It just sits at the blank galaxy screen. Any ideas?