Find the answer to your Linux question:
Results 1 to 4 of 4
I have a web application which calls scripts on the linux box it's deployed on. Currently, there are some file permission issues which prevent the scripts from running properly. How ...
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    16

    Question How to give web application/daemons file permissions?

    I have a web application which calls scripts on the linux box it's deployed on. Currently, there are some file permission issues which prevent the scripts from running properly. How can I give my web application the needed permissions? I thought of creating a user 'group' , assigning my web app to that group, and changing the ownership of the script files to the new group. Unfortunately, I'm having trouble with the following:

    1. What user id does my web app have?
    2. If my web app does not have an user id, how can I create and assign one to it?


    Thanks.

  2. #2
    Linux User Manko10's Avatar
    Join Date
    Sep 2010
    Posts
    250
    Does your webapp run under Apache? Then it's the Apache user, mostly named www-data. If unsure, let your webapp create file and see which user it belongs to.
    Refining Linux Advent calendar: “24 Outstanding ZSH Gems

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    16
    Quote Originally Posted by Manko10 View Post
    Does your webapp run under Apache? Then it's the Apache user, mostly named www-data.
    No; it runs in a Tomcat application server.

    Quote Originally Posted by Manko10 View Post
    If unsure, let your webapp create file and see which user it belongs to.
    I've tried that, but oddly the "owner" is root.

  4. #4
    Linux User Manko10's Avatar
    Join Date
    Sep 2010
    Posts
    250
    That is not good at all. You should change your configuration to make Tomcat handle requests as an unprivileged user. This user then needs acess und execution rights for the appropriate files.
    Refining Linux Advent calendar: “24 Outstanding ZSH Gems

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...