-1

I have a server which runs Ubuntu 13.04 and I want to access it using WebDAV (as SSHFS is too slow, and security isn’t that important in my case). I tried setting it up with Apache, but it didn’t work because Apache user, www-data, doesn’t have root privileges needed for accessing everything. And Apache refused to run as root either.

What can I do to solve this? I would much prefer not complicating matters by switching to NFS or Samba through a VPN. It’s just a small cheap server after all.

13
  • 3
    Wait a minute. You want to provide read-access to your complete filesystem (/) and you don't care about security? I think you should care about security if this box is connected to the danger of the world wide web. :)
    – gertvdijk
    Jul 17, 2013 at 21:35
  • Why not ssh? it's secure and fast and you gain access to the whole computer...
    – Alvar
    Jul 17, 2013 at 21:52
  • @gertvdijk: worse, readwrite access :) However, with a mere login and pass anybody can do anything to it anyway, so I don’t see how WebDAV with a password is worse than SSH.
    – Emily
    Jul 17, 2013 at 21:57
  • @Alvar: WebDAV has native support on Windows and Android. (Also SSHFS is slow and I wasn’t so far able to find how to make it fast enough.)
    – Emily
    Jul 17, 2013 at 21:58
  • 1
    @Alvar: WebDAV over HTTPS is encrypted, and the level of encryption SSL provides is quite enough for me.
    – Emily
    Jul 17, 2013 at 22:11

1 Answer 1

2

As you can tell by the comments, your use case is far from conventional or recommended. You are trying to mount and modify an entire filesystem by using an apache process running inside a permissions and security model on that filesystem. This problem will not go away, because Apache is of course designed to prevent remote persons from controlling the whole damn filesystem (including the parts "underneath" Apache or root). So you need to:

  1. rethink your problem as one that fits inside the Apache model, or
  2. find some system-level webdav support (unlikely), or
  3. forget about webdav (most likely).

Probably a combination of 1 and 3. You cannot legitimately want to be able to overwrite, say, libc remotely. This is why we are looking at you strangely. What are you trying to affect? If you are trying to use this to roll out system configuration changes, find an appropriate tool (chef, puppet, etc.). If you are using this as deployment mechanism (say for websites or applications), try a build tool like gradle.

If you are that worried about speed, you shouldn't be remotely mounting a filesystem anyway. For example, when you would prefer to bundle a series of edits and deliver them compressed in a semantic group... then you're talking about git (version control). No persistent connection, nothing more than SSL needed, compressed storage, compressed communication, rollback capability, etc. But even in that case you shouldn't be messing w/ binaries on the running system.

2
  • I’m not that worried about speed, it’s just that it took more than one minute to load the contents of an SSHFS-shared folder on my laptop. Any directory navigation is literally impossible.
    – Emily
    Jul 18, 2013 at 9:51
  • And I don’t want to overwrite libc remotely :) A lot of config files are unaccessible by Apache. Log files, too. I know that there’s a better—more convential—way for solving any of my problems, but far too often I find myself wishing for easy complete r/w access when I stumble upon a problem I hadn’t thought of.
    – Emily
    Jul 18, 2013 at 10:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .