Servoy headless writing files as root

The forum to discuss the Headless version of Servoy. Web, Java and Servlet development questions can all be posted here.

Servoy headless writing files as root

Postby Gordon » Tue Aug 23, 2011 5:00 pm

Hi

I am using Servoy Headless Client to write files from one server to another via a shared folder. The issues is that Servoy is using root privileges and hence the share will not recognise the written file. Is there a way to change the privileges Servoy is using for this process ?

Many thanks
Gordon
Gordon McLean
Click Digital Media Ltd
SAN Developer
www.clickdigital.com
User avatar
Gordon
 
Posts: 265
Joined: Thu Mar 17, 2005 8:05 pm
Location: UK

Re: Servoy headless writing files as root

Postby jcompagner » Tue Aug 23, 2011 5:06 pm

don't start servoy as root?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy headless writing files as root

Postby Gordon » Tue Aug 23, 2011 5:09 pm

Thanks - thats kinda logical !! :oops:
Gordon McLean
Click Digital Media Ltd
SAN Developer
www.clickdigital.com
User avatar
Gordon
 
Posts: 265
Joined: Thu Mar 17, 2005 8:05 pm
Location: UK

Re: Servoy headless writing files as root

Postby Gordon » Tue Aug 23, 2011 5:15 pm

jcompagner wrote:don't start servoy as root?


Hi Johan

I have just taken a look at the install and both the whole of the Servoy folder is marked as owner/group ubuntu. The app is started with this script

#!/bin/bash
cd /home/ubuntu/servoy_514/application_server

export LD_LIBRARY_PATH=/home/ubuntu/servoy_514/application_server/sybase_db
sybase_db/dbsrv11 @sybase_db/sybase.config
sleep 5
nohup ./servoy_server.sh &

SO I am not really sure where I have started it as root - however it certainly seems to be the problem.

Cheers
Gordon
Gordon McLean
Click Digital Media Ltd
SAN Developer
www.clickdigital.com
User avatar
Gordon
 
Posts: 265
Joined: Thu Mar 17, 2005 8:05 pm
Location: UK

Re: Servoy headless writing files as root

Postby Gordon » Wed Aug 24, 2011 8:50 am

The issue here was not in fact Servoy, it was where Servoy was writing files to.

The project requires Servoy to move streamed files from one server to another via a shared folder. The file therefore streams to the uploads folder in the servoy root directory and on completion the callback moves the file from there to /shared - this was the point where the file permissions were set to root rather than the expected ubuntu user. What we had not realised is that by placing them in /share we were intact instructing Linux to uplift their permissions to root and by moving /share to /home/ubuntu/share we corrected the issue.

What this now means is Servoy is able to stream video files to the server and on receipt move them to the Apache server for use with our mobile app.

Cheers
Gordon
Gordon McLean
Click Digital Media Ltd
SAN Developer
www.clickdigital.com
User avatar
Gordon
 
Posts: 265
Joined: Thu Mar 17, 2005 8:05 pm
Location: UK


Return to Servoy Headless Client

Who is online

Users browsing this forum: No registered users and 5 guests