App file ownership in production

14 views
Skip to first unread message

sdc50

unread,
Aug 19, 2015, 11:22:33 AM8/19/15
to Tethys Platform
I just updated the demo server to 1.2, and then updated one of the apps. I when through the steps outlined Installing Apps in Production docs including running python setup.py install, and running chown -R apache:apache /var/www/tethys/. However, after installing the app I would get an internal server error. After digging around a bit I realized that most of the other apps where only linked rather than copied into the src code, so I ran through the installation steps again but this time ran python setup.py develop and it worked. 

This is what I think is happening:
  • When running python setup.py install as root, the app source files are copied from /var/www/tethys/apps/ to /usr/lib/tethys/src/tethys_apps/tethysapp/ and are owned by root
  • Running chown -R apache:apache /var/www/tethys/ therefore has no effect on the copied files
  • However, if the source files are linked then changing the ownership of /var/www/tethys/ would give the apache user access to those files, and that's why it worked for me
If I'm understanding correctly then I think that step 7 of the the docs need to be updated to:

 chown -R www-data:www-data /var/www/tethys/apps/ to /usr/lib/tethys/src/tethys_apps/tethysapp/

I'm happy to put in an issue and make the change, but I just wanted to be sure I was understanding things correctly first.

Nathan Swain

unread,
Aug 19, 2015, 1:15:26 PM8/19/15
to Tethys Platform, sdc50
That sounds good to me. I have always installed apps in production using the develop command so I could easily update them, so I've never encountered this issue before. Thanks for investigating it.

--
You received this message because you are subscribed to the Google Groups "Tethys Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tethysplatfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tethysplatform/e54f0d48-46db-4c3c-b397-d2a644f56249%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Nathan Swain
Reply all
Reply to author
Forward
0 new messages