[opencms-dev] Scheduled Job - java.io.IOException: Permission denied when writing file
Philipp Bühler
doublefips at googlemail.com
Mon Nov 7 11:05:18 CET 2011
hello,
if you can, login to AIX, switch to the user running the appserver,
e.g. "su - jboss"
and "cd" to that directory, and try to create a file, e.g. "touch moo.out".
At least any parent directory to the desired one must have
"x"-permissions for that user.
Otherwise talk to your sysadmin about it.
2011/11/7 <Martin.Rosenthal at oerag.de>:
>
> Hello,
>
> i've created a Java-Class which is writing a file in filesystem. It's a
> simple method using
>
> File file = new File(variable with filename);
> file.createNewFile();
>
> The class i'm using as a scheduled job in OpenCMS. On a Windows System it's
> working fine and a file is generated. But on an AIX Unix System System i
> get an Java exception
>
> java.io.IOException: Permission denied
> at java.io.File.createNewFile(File.java:894)
> at de.mwsg.cms.modules.competition.CompetitionDatGenerator.launch
> (CompetitionDatGenerator.java:53)
> at org.opencms.scheduler.CmsScheduleManager.execute
> (CmsScheduleManager.java:176)
> at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
> at org.opencms.scheduler.CmsSchedulerThread.run
> (CmsSchedulerThread.java:123)
>
> But the directory folder, in which the file should be written, has
> permissions for all users to read, write and execute files in it. I think
> the users, under which the scheduled job is executed should be the same as
> the user of the application server in which OpenCMS is running. Is this
> right? Are there some special conditions to be regarded under Unix?
>
> Thanks and regards,
> Martin Rosenthal
> _______________________________
> IT-Anwendungen
>
> Tel.: 0211 529 5775
> Fax: 0211 529 59775
> Email: Martin.Rosenthal at oerag.de
> Internet: www.oerag.de
>
> ÖRAG Rechtsschutzversicherungs-AG
> Hansaallee 199, 40549 Düsseldorf
> Vorstand: Klaus R. Hartung, Andreas Heinsen
> Aufsichtsratsvorsitzender: Ulrich Jansen
> Sitz der Gesellschaft: Düsseldorf, Registergericht Düsseldorf HRB 12073
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
> irrtümlich erhalten haben, informieren Sie bitte den Absender und
> vernichten diese
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
More information about the opencms-dev
mailing list