Announcement

Collapse
No announcement yet.

Can I have ownership of my server as well as www-data.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can I have ownership of my server as well as www-data.

    I've got my server setup now and I have been changing ownership from www-data to my username everytime I want to access files from my server over the network. Is there a way that I don't have to take down the server everytime I add/remove/edit files on it?

    #2
    Re: Can I have ownership of my server as well as www-data.

    A few questions:

    Originally posted by jk4y
    I've got my server setup now
    What sort of server?

    and I have been changing ownership from www-data to my username everytime I want to access files from my server over the network.
    What files? How are you trying to access them?

    Is there a way that I don't have to take down the server everytime I add/remove/edit files on it?
    Why are you taking down the server anyway?

    Comment


      #3
      Re: Can I have ownership of my server as well as www-data.

      Xubuntu, apache, mysql, php, headless server with pictures, music stuff like that. Mostly used for seedbox, proxy, and sharing pictures and video with family.

      Most of the time I need to access files is if I don't want to delete lots of files individually through shell. I would rather use samba, highlight and delete. When I try this I get "permissions denied" so I get on the server shell and run "sudo chown -R jk /var/www". I also need to do this when editing my index.php or html files (which I do quite often since I'm still learning). This is cool and all, but sometimes I forget to "sudo chown -R www-data /var/www".

      Now that I double checked it, I think the only thing that goes down is torrentflux, so it is really not that big of a problem. It would still be nice to be able to not have to change ownership everytime I want to edit/delete files.

      Comment


        #4
        Re: Can I have ownership of my server as well as www-data.

        OK... so as I understand it, whatever you're running on the web server is creating files (owned by www-data) that you want to delete? The issue then is that the user that you connect through Samba as doesn't have permissions to those files.

        Look at their permissions - if they're group read/writeable, then the easiest approach might be to add the www-data group to your user account:

        sudo adduser jk www-data

        Changes might not take effect until your next login.

        If you're making regular changes to the HTML files, you might consider using Apache's option to share ~/public_html folders - that way you won't need to worry about permissions for your own user.

        Hope these suggestions help!

        Comment

        Working...
        X