I can not write in file

hi
i use tomcat5.32 + cpanel .
my code is :
<%
String path = application.getRealPath("");
path +="/as.txt" ;
FileOutputStream fos = new FileOutputStream(path);
fos.write("this is test ?".getBytes());
fos.flush();
fos.close();
%>
when requested get this error :
java.io.FileNotFoundException: /home/domainname/public_html/ROOT/as.txt (Permission denied)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.<init>(FileOutputStream.java:179)
java.io.FileOutputStream.<init>(FileOutputStream.java:70)
org.apache.jsp.newjsp2_jsp._jspService(newjsp2_jsp.java:61)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
the perms is 0644 or 0664 but my program can not write in own files .
please help me !!

Are you sure that the tomcat process is run by the right user that actually has permission to write the file?
The file's permissions might be '664' to you, but maybe the tomcat process's user is not in the correct group.

Similar Messages

  • Final Cut can not write file

    I suddenly can not edit a project. Final Cut X is telling me that it can not write the file, due either to a permissions issue or insufficiant space. Yet, neither of these seems likely. Here is why:
    Permissions: The project file is on an external drive and as such, permissions do not appear to be a relevant issue.
    Insufficiant space: I have roughly 1/2 tb of available space on the external drive where the file resides. The file in question is several hundred gb in size, but given the amount of available space on the drive, I do not think that should be the issue.
    Anyone got any suggestions?

    Tom, that’s the weird thing…everything was fine one day, then a day later, it wasn’t. And nothing had changed to speak of. Sure, I was using the computer for other things but I didn’t install any new hardware/software or anything like that, the amount of free space on the various drives didn’t experience any sudden changes, et cetera.
    FCP has all the updates installed, so it is as up to date as possible. The same with the OS. But again, neither of these have been updated since before the problem suddenly just appeared. The source media is on the same drive and referenced by alias, not actually imported into the project files. There were no errors regarding those files from withing FCP. I believe the defaults for FPX are at default in regard to things such as the cache files. At least, I find nothing in the basic preferences which would change that and I have not gone into any project specific settings anywhere to make such a change. But in light of your previous comments, I’m wondering if there isn’t some way to direct FCP to use another drive — one with more free space available — as the cache drive.

  • Windows error msg:  "Can not write to drive G: Joe's iPod"

    Halfway thru the download process (1780 songs) from itunes to my ipod I get a windows error msg:
    "Can not write to file G: Joe's ipod. All the data has been lost. Check for an error on your computer or network."
    Getting the error msg: " Can not write to drive G: Joe's ipod. All data has been lost, your computer or network may have failed."
    "Windows/ My computer" shows my ipod as drive G: and itunes starts up properly when I plug my ipod into my firewire port. About halfway thru the download (1780 songs) the transfer from itunes to my ipod stops and I get the above error message. (Never worked with USB). I am not on a network.
    According to tech supt, I have:
    -Installed Service Pack 2,
    -Restored ipod to factory settings
    -Installed update 5.0.1. Everything worked fine last Feb with the version 4 of itunes when I first loaded everything up.
    Have tried to reinstall version 4, but no luck.
    My ipod charges fine thru the firewire cable.
    Any ideas?? Thanx anyone.

    Joe,
    I am having the same problem, did you ever solve it, please email me at [email protected] with any help
    Thanks

  • Hi, the problem of deleting files / videos seeds desktop to go into Terminal and then sudo rm-rf ~ /. Trash Pohangina the answers I've had e of someone in her forum but when I write procedures line in Terminal as the Krever my password and it can not writ

    Hi, the problem of deleting files / videos seeds desktop to go into Terminal and then sudo rm-rf ~ /. Trash Pohangina the answers I've had e of someone in her forum but when I write procedures line in Terminal as the Krever my password and it can not write anything there, I write but nothing comes and my problem is not löst.När I want to delete the movie / video image Frin desktop still arrive Finder wants to make changes.Type your password to allow this. But even that I type my password file / video is left I need help in an easier way or another set-even those on the terminal that I can not type my password to solve the problem Regards Toni

    If you want to preserve the data on the boot drive, you must try to back up now, before you do anything else.
    There are several ways to back up a Mac that isn't fully working. You need an external hard drive to hold the backup data.
    1. Boot from the Recovery partition or from a local Time Machine backup volume (option key at startup.) Launch Disk Utility and follow the instructions in this support article, under “Instructions for backing up to an external hard disk via Disk Utility.”
    2. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode. Use the working Mac to copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    3. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.

  • Crystal Server 2013: How to troubleshoot "Can not create temp file---- Error code:-2147215357"

    We have a Java7 web app, which generate PDF report by calling Crystal Server 2013 SP4.
    The app is being deployed on many different servers. We sometimes got the error below when generating report:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Can not create temp file---- Error code:-2147215357 [CRSDK00000615] Error code name:internal
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.controllerExportInternal(PrintOutputController.java:280)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(PrintOutputController.java:152)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(PrintOutputController.java:130)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(PrintOutputController.java:113)
    Problem is, this seems to be  a pretty generic exception. It could be caused by many different reasons.
    e.g. network connection problem, wrong DB login, wrong folder path, lack of folder access right, etc.
    Each time we could only guess what's wrong.
    We are running into it again, and this time everything seems correctly configured so far.
    We wonder if there are more info we can get to troubleshoot? For example, any log file of Crystal Server we should look into? Or does Crystal Server has debug mode which prints more details to tell us what goes wrong?

    Prithviraj Shekhawat wrote:
    Hi Henry,
    I believe you are using RAS SDKs to export the reports to PDF.
    Apply trace on RAS server and check what you find in RAS logs.
    Check whether you can see timeout error is RAS logs. Usually if connection is lost and the RAS server no more have the session to write to the temp directory, we do see these errors.
    Also, does the account that runs RAS have permissions to create a file in RAS's default temp directory? Are you getting any out of memory or out of disk space exceptions on App server or RAS, tracing RAS server is the way to move forward.
    Thanks,
    Prithvi
    >>I believe you are using RAS SDKs to export the reports to PDF.
    Yes
    >>Apply trace on RAS server and check what you find in RAS logs.
    >>Check whether you can see timeout error is RAS logs.
    How to configure tracing, and where are RAS logs? Is it configured in CMC --> Servers --> Crystal Report Services?
    >>Also, does the account that runs RAS have permissions to create
    >>a file in RAS's default temp directory?
    Pretty sure yes.
    >> Are you getting any out of memory or out of disk space exceptions
    >>on App server or RAS, tracing RAS server is the way to move forward.
    Not on App server.
    For RAS, that's the problem, I am not sure where to look.......

  • Can not create temp file---- Error code:-2147215357 [CRSDK00000615] Error code name:internal

    Hello,
    While exporting Export reporting from BI4 getting exception
    Can not create temp file---- Error code:-2147215357 [CRSDK00000615] Error code name:internal
    In Trace Log I am getting
    com.crystaldecisions.xml.serialization.XMLWriter||Failed to create an object instance for CrystalReports.TextObjectFormat
    java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key CrystalReports.TextObjectFormat
      at java.util.ResourceBundle.getObject(ResourceBundle.java:374)
      at java.util.ResourceBundle.getString(ResourceBundle.java:334)
    I tried following solution according to the all forums but still issue exist.
    Done changes mention in KB article In <Installation-dir-of-BO>\Common\4.0\java\CRConfig.XML we have to increase the JAVA heap MIN and Max size
              <JVMMaxHeap>64000000</JVMMaxHeap>          <JVMMinHeap>32000000</JVMMinHeap>
    Increase the value in the ReportApplicationServer Services in the CMC for "Number of database records to read when previewing or refreshing a report". The value -1 is for unlimited records but not recommended for performance.
    Check for temporary read write permission on server
    Using SDK library from C:\Program Files (x86)\SAP Business Objects\SAP BusinessObjects Enterprise XI 4.0\java\lib
    Can you please let me know is there anything missing.

    Hi,
    We face the same problem with some BI4 reports.
    The same report works well with the "Crystal Reports Viewers API", as used in Infoview, but not with the "Report Application Server (RAS) API".
    This error appears after some time working on a report. If we reproduce the same report, but from zero, no problem.
    Hope it can help.
    Ludovic.

  • Can't write cache file for while creating domain in soa 11.1.1.5 on HP-UX

    Hi,
    Installing SOA 11.1.1.5 on HP-UX and during domain creation/configuration I am getting the below errors
    **sys-package-mgr: can't write cache file for**
    and have lots of cache file errors for different packages
    Any idea what might be wrong and whats the cause of these errors and is it safe to ignore these errors if not what is the work arround. As I already looked at the below post but I don't find */var/tmp/wlstTemp* on my machine as suggested in the post below.
    SOA 11.1.1.5 install got can't write cache file
    So wondering if there's anything else I can do i.e. while creating or configuring a Domain pass some parameter to config.sh etc.
    Thanks

    Hi,
    I don't see python.cachedir in config.sh. Here is config.sh
    #!/bin/sh
    mypwd="`pwd`"
    # Determine the location of this script...
    # Note: this will not work if the script is sourced (. ./config.sh)
    SCRIPTNAME=$0
    case ${SCRIPTNAME} in
    /*)  SCRIPTPATH=`dirname "${SCRIPTNAME}"` ;;
      *)  SCRIPTPATH=`dirname "${mypwd}/${SCRIPTNAME}"` ;;
    esac
    # Set the ORACLE_HOME relative to this script...
    ORACLE_HOME=`cd "${SCRIPTPATH}/../.." ; pwd`
    export ORACLE_HOME
    # Set the MW_HOME relative to the ORACLE_HOME...
    MW_HOME=`cd "${ORACLE_HOME}/.." ; pwd`
    export MW_HOME
    # Set the home directories...
    . "${SCRIPTPATH}/setHomeDirs.sh"
    # Set the config jvm args...
    CONFIG_JVM_ARGS="${CONFIG_JVM_ARGS} -DCOMMON_COMPONENTS_HOME='${COMMON_COMPONENTS_HOME}'"
    export CONFIG_JVM_ARGS
    # Delegate to the main script...
    "${WL_HOME}/common/bin/config.sh" "$@"Thanks

  • Can not open the file

    After the report files were moved to the directory under root in Linux, I can not open the file(.rdf) in my working directory in linux even though it doesn't work in the report builder in window.(it used to work fine)
    error message the following;
    rep-0110:unable to open file 'c:\documents and settings\myhome\desktop\invoice10.rdf
    rep-1070:error while opening or saving a documents
    can you tell me what it is the solution for that?
    Message was edited by:
    Jin

    I think I have to recompile the files again.
    I found the following solution but i do not know where do i write this script(Dos) and how to run it.
    can you tell me more detail?
    For Windows
    Forms/Reports 6i
    REM WINDOWS COMPILE FORMS
    ::compile_forms.bat
    cls
    Echo compiling Forms....
    for %%f IN (*.fmb) do ifcmp60 userid=scott/tiger@v817  module=%%f batch=yes
        module_type=form compile_all=yes window_state=minimize
    ECHO FINISHED COMPILING
    REM WINDOWS COMPILE REPORT
    ::compile_report.bat
    cls
    Echo compiling Report .....
    for %%f IN (*.rdf) do RWCON60 userid=scott/tiger@v817 batch=yes source=%%f
        stype=rdffile DTYPE=REPFILE  OVERWRITE=yes  logfile=log.txt
    ECHO FINISHED COMPILINGMessage was edited by:
    Jin
    Message was edited by:
    Jin
    Message was edited by:
    Jin

  • I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. The Guest login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • SOA 11.1.1.5 install got can't write cache file

    Hi,
    I installed 2 node cluster of SOA 11.1.1.5 on linux and during domain configuration I got errors i.e.
    **sys-package-mgr: can't write cache file for**
    Installation was done and all the servers start/stop fine am able to deploy the processes, am able to access all the urls fine everything coming up fine BAM, SOA, OSB etc . Just wondering if the error above have any effect on the installation or any piece that might not work. As I have already did the installation and ignored those errors above so just wanted to see if anything I need to look for.
    Thanks

    Hi,
    It's a cluster install and took sometime to do the full install so it will be a pain to re-install everything over. Currently have tested the processes and seems to be working fine.
    Also I don't find
    /var/tmp/wlstTemp
    I do see wlstTemp appended with linux users who did Oracle SOA install.
    Also in-future when creating a new environment besides the above chmod 777 on /var/tmp/wlstTemp is there any parameter we can supply when running config.sh. I read some where that in-order to get by these errors at the time of domain creation we can also pass some parameter.
    Thanks

  • Can't write to file when double-clicking jar...

    This issue has me stumped. I have a jar dssetup.jar... The manifest looks like the following...
    Manifest-Version: 1.0
    Main-Class: DSsetUp
    Created-By: 1.3.0_02 (Sun Microsystems Inc.)
    I also have a text file that I read and write to(this file is outside the jar):
    datasource.txt
    If I execute my jar from the command line, I can read and write to the file...no problem. However, if I double click my jar to run it, I can read the text file but cannot write to the text file. Has anyone seen this before?
    Thanks

    It is true ..
    you can not write anything to .jar file directly..
    .jar file is not a common file, it is compressed.
    the following tool give you some cue.
    tool named JavaJar(written by java) can compress and decompress jar,war, ear and.zip...
    may download from http://www.qwerks.com/download/4114/JavaJar.zip
    the tool is very verygood tool.
    but the homepage(www.pivotonic.com) of JavaJar cannot be accessed.
    it is funny.
    good lucky.

  • Can't Write XMP Files

    I'm using Windows XP and LR 1.3.1 and I can't seem to write a specific folder of files. I'm trying to create the XMP files so I can do a global edit to modify the Lense type. When I select all and then click on Save Metadata to Files, the program does not write the files for this specific folder. I have tried this on other files and I don't get the same problem. I have tried moving the specific files themselves to their own collection and trying the same process above, but I get the same result.
    These are Pentax K10D files saved as PEF files.

    The only way that I could get Lightroom to write the xmp files for these specific files was to make a change to all of them AND I had to turn on Automatically write changes to xmp files in the catalog preferences section. If this option was not set, even after making a change to the files, Lightroom would not create the xmp files.
    So I finally got the program to create the xmp files, I just can't understand what's different about these 93 files that insisted on having xmp writes turned on globally before any xmp files could be created. I turned off this global setting after creating the needed files.
    The whole purpose of this exercise was to change the Lense Description to a Sigma 10-20mm F4 from a Tamron lense. I found a shareware program that allowed me to select a directory of files and make a global edit to all 93 xmp files at once. I then read the XMP files back into Lightroom and everything is right with the world.
    Is the option of NOT changing the lense designation within Lightroom a XMP limitation or is this a design decision of the LR engineering team? It sure would be nice to have the option to PAINT the changes (in this case lense description) from one image to the rest of the group, if one chose to do this.

  • #3125 error. I can not open the file

    We work on a Mac and a Win machine. We share the files via a NAS. We now encounter the problem that the muse-site saved by the Win machine can no longer be openend by the Mac. (#3125 error. I can not open the file). The only option to continue is to work via the Win machine.... ;-((( Please give us a solution. Ed

    A 3125 error indicates the operating system returned an error when Muse attempted to open the file.
    It's highly unlikely there's anything wrong with the file. If you haven't already confirmed, if you copy the file to the Mac's local drive it will open fine.
    I'm suspicious of file/folder permissions. Is it possible the account used to mount and write to the NAS from Windows has different user permissions than the account that's attempting to read it on the Mac? I could theorize a 3125 error might occur if one user with the necessary permissions wrote a file to the NAS and then a second user with insufficient permissions attempted to open it.
    Also, two users cannot simultaneously open the same .muse file on the NAS. Is that what's being attempted in this case? Muse goes to great lengths to attempt to prevent this and should put up an error about the file already being open in another copy of Muse. However, how that's detected is dependent on OS APIs that have subtly different behaviors on different servers and server protocols.

  • LabVIEW could not write the file back to disk (-2570)

    Hello,
    i use this MDF data storage plugin to write MDF files: mdf plugin
    I created a project with some VI's like MDFOpen.vi, MDFClose.vi, MDFWriteDouble.vi, etc ...
    I also created a Test VI which generates data at a specific rate (want to see performance) and write it to a MDF file. It works ....
    Now I want to use this in C#. I compiled a LabView .Net DLL out of my MDF VI's and referenced it in Visual Studio. I can open a MDF File from C# and close it. But as soon as I write a double (actual content) into the MDF File I get an exception when I call MDFClose.vi from DLL. Obviously "Close Data Storage <APPEND>" from inside my MDFClose.vi returns error -2570: LabVIEW could not write the file back to disk. I have no idea why.
    regards
    Thomas

    So I guess it's time to update this post for anyone who also have problems with MDF or Storage/DataPlugin VIs in general.
    My task was to create a MDF Logger, so I needed to write MDF files. MDF4Lib from Vector mentioned in an above post can only read MDF files. ETAS is also selling an MDF Lib but there are reasons I don't want that. So why not use MDF Storage/DataPlugin from NI? I can tell you.
    My MDF Logger is now finished and can create MDF files with groups and channels, just like TDMS, but ... when I write data in a loop and then finish by closing the MDF File/Reference it may happen that:
    i get error LabVIEW could not write the file back to disk (-2570)
    application crashes
    both 1 and 2
    If it does not crash or throw an error it succeeds finishing my MDF file correctly but next time I repeat this (without restarting application) I notice writing data takes longer than in first run and my memory is increasing. The more I repeat the longer it takes to write data to MDF and the more memory is increasing until it finally crashes. It also depends on how much data in how many groups/channels are written.
    NI Support already got this and confirmed that with desktop execution tracekit you will see that with each call to a Storage/DataPlugin VI references are leaking. Those leaks are assumed to be the root cause of all that trouble. There is not bugfix but apparently one or more CAR's about this. So I guess this is not MDF specific but generally with Storage/DataPlugin.
    My current only workaround is to close the app each time after I am done writing one MDF file. My future fix will be to implement MDF on my own.

  • I can not attach any files to email or Facebook. When I go to "browse" the window comes up and disappears immediately. I updated browser and Adobe Flash. Restarted computer and zapped pram. any ideas? Please help!

    I can not attach any files to email or Facebook. When I go to "browse" the window comes up and disappears immediately. I updated browser and Adobe Flash. Restarted computer and zapped pram. any ideas? Please help!

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box. Don't use the Safari-only Guest login created by Find My Mac.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. The Guest login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, or if a firmware password is set, you can’t boot in safe mode.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

Maybe you are looking for