Checking /Viewing Unix file permissions

Is there a way for me to check file permissions (In Java) under unix, without having to call a system dependent function. (ie Runtime.getRuntime(); run.exec(....))
Any help would be greatly appreicated.
Curtney

Thank you for replying.
You are correct, I can detect ile permissions by using these functions, more specifically whether the current running application is able to read/write to a particular file.
However, I am interest in knowing the file permissions /attributes
for user and group on the unix file system despite whether the current running application can read/write to a particular file.
ie,
-rw-rw--r-- 1 username groupname size date .... filename
I have searched and I believe, currently, there is not a class/member function that accomplishes the above.
Again, Thanks for responding.
Curtney

Similar Messages

  • Setting the UNIX file permissions after writing the file to a directory

    Hi Experts,
    Can we set the UNIX file permissions after writing the file to a directory using Receiver File Adpater in SAP PI 7.1 ?
    Thanks in Advance.
    Regards,
    Jyoti

    Hi
    you can use the option "Run Operatiing system Command after File Processing" in the file adapter.
    Thanks
    Rinku Gangwani

  • Regarding the UNIX files permissions

    Your questions are being deleted each time when you cross-post them again. If you do it once more, your user ID will be deleted as well
    Final Warning
    Hi Experts,
    As we know, a UNIX file will have Read, Write and execute permissions with owner, User and other groups. Can any one explain me the difference between READ and EXECUTE with the reference of ZDIR transaction where we can see different files.
    Thanks in advance.
    Warm regards,
    Harshad.
    Edited by: Julius Bussche on Feb 6, 2009 1:06 PM

    Hi,
    Filesystem doesn't manage permissions; the OS does. For the filesystem, there is only read and write.
    It's up to the OS to decide if it will allow a file to be loaded into memory or not, and it uses the "execute" bit to help make that decision.
    Note that the execute bit is "overloaded" in that it also indicates if a script is runnable directly, or if a directory's contents can be listed.

  • What does the "@" symbol after the "rwx" UNIX file permissions mean?

    Greetings All,
    I tried to run the Alliance VLSI CAD system using an example (examples/alliance-examples/multi16b-reg), but have not been able to.
    It complains that the file "vasy" cannot be executed as a binary file.
    Here is the transcript from the Terminal session.
    Go Trojans >make all
    MBKWORKLIB=.; export MBKWORKLIB; MBKCATAL_NAME=NOCATAL; export
    MBKCATALNAME;
    /Applications/apps/eda/alliancevlsi_cad_sys/downloadfiles/opt/alliance-5.0/bin/vasy
    -a -B -L -o -p -I vhdl multi16
    /bin/sh: /Applications/apps/eda/alliancevlsi_cad_sys/downloadfiles/opt/alliance-5.0/bin/vasy:
    cannot execute binary file
    make: * [multi16.vbe] Error 126
    Go Trojans >
    When I run "ls -al" in $(ALLIANCE_TOP)/bin, I get the following in
    the Terminal.
    Go Trojans >ls -al
    total 17656
    drwxr-xr-x@ 52 zhiyang staff 1768 Sep 2 2009 .
    drwxr-xr-x@ 12 zhiyang staff 408 Apr 12 16:24 ..
    -rwx------@ 1 zhiyang staff 108129 Sep 2 2009 a2def
    -rwx------@ 1 zhiyang staff 12219 Sep 2 2009 a2lef
    -rwx------@ 1 zhiyang staff 8713 Sep 2 2009 alcbanner
    -rwx------@ 1 zhiyang staff 135645 Sep 2 2009 asimut
    -rwx------@ 1 zhiyang staff 24975 Sep 2 2009 attila
    -rwx------@ 1 zhiyang staff 25747 Sep 2 2009 b2f
    -rwx------@ 1 zhiyang staff 157479 Sep 2 2009 boog
    -rwx------@ 1 zhiyang staff 111598 Sep 2 2009 boom
    -rwx------@ 1 zhiyang staff 106837 Sep 2 2009 cougar
    -rwx------@ 1 zhiyang staff 568722 Sep 2 2009 def2a
    -rwx------@ 1 zhiyang staff 251206 Sep 2 2009 dreal
    -rwx------@ 1 zhiyang staff 20138 Sep 2 2009 druc
    -rwx------@ 1 zhiyang staff 40808 Sep 2 2009 exp
    -rwx------@ 1 zhiyang staff 30100 Sep 2 2009 flatbeh
    -rwx------@ 1 zhiyang staff 9975 Sep 2 2009 flatlo
    -rwx------@ 1 zhiyang staff 9959 Sep 2 2009 flatph
    -rwx------@ 1 zhiyang staff 10746 Sep 2 2009 flatrds
    -rwx------@ 1 zhiyang staff 20588 Sep 2 2009 fmi
    -rwx------@ 1 zhiyang staff 20425 Sep 2 2009 fsp
    -rwx------@ 1 zhiyang staff 9962 Sep 2 2009 genlib
    -rwx------@ 1 zhiyang staff 2455 Sep 2 2009 genpat
    -rwx------@ 1 zhiyang staff 412314 Sep 2 2009 graal
    -rwx------@ 1 zhiyang staff 10881 Sep 2 2009 k2f
    -rwx------@ 1 zhiyang staff 78387 Sep 2 2009 l2p
    -rwx------@ 1 zhiyang staff 108420 Sep 2 2009 loon
    -rwx------@ 1 zhiyang staff 33889 Sep 2 2009 lvx
    -rwx------@ 1 zhiyang staff 36842 Sep 2 2009 m2e
    -rwx------@ 1 zhiyang staff 55347 Sep 2 2009 mips_asm
    -rwx------@ 1 zhiyang staff 65038 Sep 2 2009 moka
    -rwx------@ 1 zhiyang staff 2448244 Sep 2 2009 nero
    -rwx------@ 1 zhiyang staff 2172602 Sep 2 2009 ocp
    -rwx------@ 1 zhiyang staff 14498 Sep 2 2009 pat2spi
    -rwx------@ 1 zhiyang staff 9887 Sep 2 2009 pdv
    -rwx------@ 1 zhiyang staff 51121 Sep 2 2009 proof
    -rwx------@ 1 zhiyang staff 178806 Sep 2 2009 ring
    -rwx------@ 1 zhiyang staff 60506 Sep 2 2009 s2r
    -rwx------@ 1 zhiyang staff 37106 Sep 2 2009 scapin
    -rwx------@ 1 zhiyang staff 12324 Sep 2 2009 sea
    -rwx------@ 1 zhiyang staff 13430 Sep 2 2009 seplace
    -rwx------@ 1 zhiyang staff 12276 Sep 2 2009 seroute
    -rwx------@ 1 zhiyang staff 82653 Sep 2 2009 sxlib2lef
    -rwx------@ 1 zhiyang staff 77310 Sep 2 2009 syf
    -rwx------@ 1 zhiyang staff 301653 Sep 2 2009 vasy
    -rwx------@ 1 zhiyang staff 11854 Sep 2 2009 x2vy
    -rwx------@ 1 zhiyang staff 12392 Sep 2 2009 x2y
    -rwx------@ 1 zhiyang staff 174556 Sep 2 2009 xfsm
    -rwx------@ 1 zhiyang staff 167747 Sep 2 2009 xgra
    -rwx------@ 1 zhiyang staff 185034 Sep 2 2009 xpat
    -rwx------@ 1 zhiyang staff 249181 Sep 2 2009 xsch
    -rwx------@ 1 zhiyang staff 178627 Sep 2 2009 xvpn
    Go Trojans >
    I suspect the "@" symbol indicates why the executables cannot be
    run, even though the file permissions are set correctly.
    How do I get rid of the "@" symbol for these files? What does the "@" symbol mean?
    Thank you.
    Message was edited by: Zhiyang

    OK... Well, do you know what else may cause the problem?
    Does the following help?
    Go Trojans >ls -leO@
    total 17656
    -rwx------@ 1 zhiyang staff - 108129 Sep 2 2009 a2def
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 12219 Sep 2 2009 a2lef
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 8713 Sep 2 2009 alcbanner
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 135645 Sep 2 2009 asimut
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 24975 Sep 2 2009 attila
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 25747 Sep 2 2009 b2f
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 157479 Sep 2 2009 boog
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 111598 Sep 2 2009 boom
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 106837 Sep 2 2009 cougar
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 568722 Sep 2 2009 def2a
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 251206 Sep 2 2009 dreal
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 20138 Sep 2 2009 druc
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 40808 Sep 2 2009 exp
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 30100 Sep 2 2009 flatbeh
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 9975 Sep 2 2009 flatlo
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 9959 Sep 2 2009 flatph
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 10746 Sep 2 2009 flatrds
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 20588 Sep 2 2009 fmi
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 20425 Sep 2 2009 fsp
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 9962 Sep 2 2009 genlib
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 2455 Sep 2 2009 genpat
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 412314 Sep 2 2009 graal
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 10881 Sep 2 2009 k2f
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 78387 Sep 2 2009 l2p
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 108420 Sep 2 2009 loon
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 33889 Sep 2 2009 lvx
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 36842 Sep 2 2009 m2e
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 55347 Sep 2 2009 mips_asm
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 65038 Sep 2 2009 moka
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 2448244 Sep 2 2009 nero
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 2172602 Sep 2 2009 ocp
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 14498 Sep 2 2009 pat2spi
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 9887 Sep 2 2009 pdv
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 51121 Sep 2 2009 proof
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 178806 Sep 2 2009 ring
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 60506 Sep 2 2009 s2r
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 37106 Sep 2 2009 scapin
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 12324 Sep 2 2009 sea
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 13430 Sep 2 2009 seplace
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 12276 Sep 2 2009 seroute
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 82653 Sep 2 2009 sxlib2lef
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 77310 Sep 2 2009 syf
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 301653 Sep 2 2009 vasy
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 11854 Sep 2 2009 x2vy
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 12392 Sep 2 2009 x2y
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 174556 Sep 2 2009 xfsm
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 167747 Sep 2 2009 xgra
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 185034 Sep 2 2009 xpat
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 249181 Sep 2 2009 xsch
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 178627 Sep 2 2009 xvpn
    com.apple.quarantine 42
    Go Trojans >
    They all seem to end with "com.apple.quarantine". What does this mean?

  • URGENT : Writing to UNIX file problem !

    Hi friends,
    I am stuck at a crucial point while uploading a UNIX file from ABAP program.
    I am using open dataset & then transfer to...the file path.
    But when I go and check the UNIX file it is split into 2 lines (it is supposed to be a
    record with 1 line with 1500 characters) ! It shows a maximum of 255 chars in one line.Moreover,while I download to a text file via Txn CG3Y,some data are missing or truncated etc.
    Please suggest how can I create a record with 1500 characters in UNIX and download it successfully with full data or how can I ensure proper data has been transferred as the record display is truncated.I checked the program its fine,only after transferring I get the problem.
    Thanks,
    Sandip.

    The files would not get truncated. The file actually exists in App. server but you will be able to see only uptil 255 characters. You can check the same by downloading it onto Pres. server by specifying  file type as BIN when you are downloading through CG3Y

  • Filie permissions

    Since upgrading to MAC 10.6 others on my network cannot edite and save files.PCs onthe network can open site files but in one case they get asked to make the file writable but can't save the file except as a new file, or they get a message that "Access to \\a path on the Mac computer\MFCD.tmp was denied.
    I checked that the file permissions on the MAC are all set to allow read and write! Dreamweaver is restrickting access.
    Help!
    Please
    Nick

    I started having this very same problem (dreamweaver CS4 on pc editing files on a share on a OSX machine) getting "access to ....tmp denied" after I modified permissions on the OSX for someone else to have access.
    In the end I had to remove the permissions of that other person to my folders on OSX and then everything was back to normal. Very weird, and yes that other person was not editing my files at the same time, in fact he wasn't even in.
    So try setting the permissions so you are the only one having read&write permissions to the files you're editing and see if you still have the error. Must have something to do file access permissions in OSX.

  • File permissions $OH Unix and Windows

    Hi,
    I am examining an Oracle audit and now looking for all the default file/directory permissions on Unix and Windows. Have searched a lot of sites now but could not find a proper list with all the permissions mentiond. Does anybody knows where to find such a list (or script) to check if my current settings are ok?
    I use OEM to check for my open security policies but this permission item is very hard to find unfortunately.
    So please some info on this unix/windows permissions issue.
    Thanks,
    Paul
    btw Have found some settings for bdump, udump, adump, $OH/rdbms/log and audit (umask 0177) but want to check those other permissions for the whoe installed Oracle software en admin directories.
    Edited by: Paul van Rixel on 12-mei-2009 13:30

    Hi,
    Picked a few alerts from EM, for example:
    Allowed Logon Version
    Default Passwords
    Default Permanent Tablespace Set to a System Tablespace
    Initialization Parameter File Permission
    The last few weeks I have already disabled some of the policies but these are the alerts which are left now and I want to get rid of them.
    When you click in EM on "Initialization Parameter File Permission" the description of it is: Ensures that access to the initialization paramater file is restricted to the owner of the Oracle software set and the DBA group.
    So, ok thats is clear to me but I want to look at the whole server/database to make it a "clean" server/db.
    Paul

  • How to check whether a file is present in the UNIX directory of app. server

    Hi,
            I am creating files in the UNIX directory in the application server using :
                       CONCATENATE '/sapmnt/RD1/interfaces/client670/'
                       p_fname '.CSV' INTO w_filename.
               OPEN DATASET w_filename FOR OUTPUT IN TEXT MODE.
              LOOP AT t_output1.
                      TRANSFER t_output1 TO w_filename.
              ENDLOOP.
             CLOSE DATASET w_filename.
    I am unable to check whether a file with the same name exists or not. How to check the duplicate state of the file.

    You can use the following fm
    RZL_READ_FILE
    or
    use OPEN DATASET FOR INPUT.

  • How to check whether a file got read permissions for perticular user

    Problem: Let JRE is running with some x as effective user in LINUX then while checking file permission it is checking permission on that file for that x user.
    File f = new File(�file name�)
    if(f.exists())
         System.out.println(�exists�);
    Else
         System.out.println(�does not exists�);
    The above code prints exists only when x user have permissions on that file
    Requirement: I would like to check whether a file got read permissions for particular user i.e. whether y user got permissions on that file.
    Any help is appreciated

    In Linux a user has to have read permission on a file to even see that it exists. As a result, if a user (or a group to which they belong) doesn't have read access to the file File.exists() will return false. Windows which doesn't have as tightly controlled access to files will admit that a file exists whether it can be read or not.
    PS.
    This is proof that I should never answer a question off the top of my head when I haven't had my red bull yet. This is wrong. You will be able to see it if you have read and execute on the directory.
    thumps self in head
    Message was edited by:
    puckstopper31

  • I can not open documents I get a message that says To view or change permissions, select the item in the Finder and choose File Get Info.  help

    I have a mac with os X.  I have saved documents and photos on my computer and am now not able to open them.  I get a message that tells To view or change permissions, select the item in the Finder and choose File > Get Info.  I do that and it is not locked.  confused.  help

    In the Info window it's this:
    Do you have read and write privileges?

  • Cannot launch vivado simulator 2015.1: behav/compile.bat' script "Please check that the file has the correct 'read/write/execute' permissions"

    Hi,
    I'm trying to run a verilog simulation using the vivado simulator 2015.1 on Windows 7.
    I get the following error when I attempt to launch simulation:    
    ERROR: [USF-XSim-62] 'compile' step failed with error(s) while executing 'D:/projects/axi/axi_test_system/axi_test_system.sim/sim_1/behav/compile.bat' script. Please check that the file has the correct 'read/write/execute' permissions and the Tcl console output for any other possible errors or warnings.
    The tcl console repeats the same message, "Please check that the file has the correct 'read/write/execute' permissions"
    I cannot find any problem with the permissions.  I believe that windows will always execute a .bat file.   Within the same project, I can run elaboration, synthesis and implementation without problems. 
    Any idea why the simulation compile script won't run?
    Thanks,
    Ed

    Hi,
    Thanks very much for your detailed reply. These were the right questions based upon what I told you.   
    However, I took the code home last night and ran it on my webpack 2014.2 release.   It still failed, but I got completely different error messages.   These messages correctly pointed me to an undeclared signal in my testbench. Once fixed, the compile worked and the simulator launched. 
    This morning, I fixed the signal name in my 2015.1 setup, and it also compiled and launched correctly. 
    So, the problem wasn't actually related to file permissions.  It seems like the 2015.1 error message may be broken compared to 2014.2.  
    I was running the Vivado GUI, clicking on "Simulate > Run Behavioral Simulation"
    Thanks again for your help. 
    Regards,
    Ed  
      

  • I have checked all of my permissions and contiue to get this message after 68% mark when trying to install Adobe flash player. User does not have sufficient privileges to install adobe flash player. A required file (C:\windows\syswow64\macromed\flash\flas

    I have checked all of my permissions and contiue to get this message after 68% mark when trying to install Adobe flash player. User does not have sufficient privileges to install adobe flash player. A required file (C:\windows\syswow64\macromed\flash\flashplayer.xpt:5) could not be written due to insufficient permission.

    Perform a clean install as described in https://forums.adobe.com/thread/928315

  • Java script in HTMLDB to check if file exists in Unix file system

    How do I use javascript to check if file is exists in Unix file system. I would like to dispaly the columns only if file is exists.

    Hello,
    This is one of those features that the manuals do not cover.
    How to use and build AJAX features could be a whole book all by itself, and it's not really HTML DB specific feature even though we have built some hooks in application and javascript to make it easier.
    Take a look at this thread
    Netflix: Nice UI ideas
    and I've built some examples here
    http://htmldb.oracle.com/pls/otn/f?p=11933:11
    Or just search the forums for AJAX or XMLHTTP
    Carl

  • Why won't OSX update? I checked file permissions, NG.

    When I try to update OSX, I keep getting an error message. I have done a clean reinstall on the OS, used Disk Utilities to check the HD and verify file permissions. When verifying file permissions, all kinds of new permissions are granted. I don't understand these or where else to look for help, as updates still won't install.
    Is this worth pursuing, or do I have a HD or logic board problem here?
    PB 12" 1.33G   Mac OS X (10.4)   bought used 40G HD installed

    Did you verify file permissions or repair file permissions? The latter is what you need to do. Have you tried it with the Mac OS X 10.4.6 Combo Update?
    Yang

  • Files (fonts) appear as Unix files when viewing on an SMB share

    We have a UNIX server running Linux which our Mac users are connecting via SMB.  We moved our company fonts to this server from an OSX Server.  All of our machines are running 10.6.6 or later.  Very intermittantly without any rhyne or reason some users when they mount the Font share, the Fonts show up as Unix files rather than the Fonts.  On my machine (10.7) they all appear normally.  Now I know that SMB was revamped in Lion so this may be the reason I can see them no problem.  But the 10.6 machines, any suggestions on fixing this?

    Any solution on this issue? I have nearly the same exact issue in my environment, but is reversed.
    The problem we have is when saving files to the server from the Snow Leopard machine, the older Tiger machines see the fonts as unix executable files. The snow leopard machine sees the files fine and can open everything with no problem.
    This only happens when saving to a SMB server, as I can save the files from Snow Leopard to a flash drive and open on Tiger with no problems. Additionaly files saved from Tiger to the server are perfectly fine when accessing from Tiger or Snow Leopard.
    We're running Windows 2008 Server and connecting via the macs using the SMB method. Also duplicated the issue on a Windows 2003 Server.

Maybe you are looking for