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?
Announcement
Collapse
No announcement yet.
Can I have ownership of my server as well as www-data.
Collapse
This topic is closed.
X
X
-
Re: Can I have ownership of my server as well as www-data.
A few questions:
Originally posted by jk4yI'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?
- Top
- Bottom
-
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.
- Top
- Bottom
Comment
-
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!
- Top
- Bottom
Comment
Comment