Permission output files

125 views
Skip to first unread message

Abkrim

unread,
Feb 19, 2012, 6:59:09 AM2/19/12
to JODConverter
Hi.

There're a problem with my app.

Scenario
Run soffice how root with:

root 14291 0.0 0.0 65968 1128 pts/5 S 12:46 0:00 /bin/
sh /opt/openoffice.org3/program/soffice -headless -
accept=socket,host=127.0.0.1,port=8100;urp; -nologo -
nofirststartwizard
root 14300 3.3 0.2 322940 48896 pts/5 Sl 12:46 0:00 /opt/
openoffice.org3/program/soffice.bin -headless -
accept=socket,host=127.0.0.1,port=8100;urp; -nologo -
nofirststartwizard

Use JODConverter for converting XLS to PDF (work fine.. a lot of
thanks)

Apache run php on mode mod_php (user for apache it's nobody)

My app exec this script:
$path = APPLICATION_PATH .'/..';
$fileOrigen = $path.'/downloads/'.$file;
$fileDestino = $path.'/downloads/'.$newFile.'.pdf';
$exec = $path.'/library/Java/jodconverter-cli-2.2.2.jar';
$command = '/usr/lib/jvm/java/bin/java -Xms2048m -Xmx2048m -
jar '.$exec.' '.$fileOrigen.' '.$fileDestino;
exec($command);

Well...
Any times file created ($fileDestino) has 644 permisions and others
600 (wrong).... and all time propierty user it's root:root...

I neewd controll output for every time 644 or best 666 permissions.

Any ideas?

Shervin Asgari

unread,
Feb 20, 2012, 6:05:22 AM2/20/12
to jodcon...@googlegroups.com
You can set what file permission the user can get by default.
Its done with the umask for the specific user, and in your case, maybe
its the apache user.

Perhaps you are running the server with root, and that is why its the
root that is owning the file.

Have a look here for umask:
http://en.wikipedia.org/wiki/Umask

BR
Shervin

> --
> You received this message because you are subscribed to the Google Groups "JODConverter" group.
> To post to this group, send email to jodcon...@googlegroups.com.
> To unsubscribe from this group, send email to jodconverter...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jodconverter?hl=en.
>

Abdelkarim Mateos Sanchez

unread,
Feb 20, 2012, 6:46:29 AM2/20/12
to jodcon...@googlegroups.com
El 20/02/2012, a las 12:05, Shervin Asgari escribió:

You can set what file permission the user can get by default.
Its done with the umask for the specific user, and in your case, maybe
its the apache user.

Perhaps you are running the server with root, and that is why its the
root that is owning the file.

I don't ask for owner.. 

Also don't ask for how to unmask a file...

That it's question...
Abdelkarim Mateos Sánchez
CEO Tamainout Hébergement, S.A.R.L. (Marruecos)
CET Tamainut IT, S.L. (España)
Contacto | abk...@tamainut.com | Skype - mamateos
Teléfono Fijo España: +34.851000209 | Marruecos Móvil: +212.671819412
islaserver.com | tamainut.tel
Abdelkarim Mateos Sánchez
Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.
This message is intended exclusively for its addresse and may contain information that is CONFIDENTIAL and protected by professional privilege. If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it.

Reply all
Reply to author
Forward
0 new messages