1

I'm setting up a new webserver on Debian. As my previous install had everything located in /srv/www I want to use the same setup to avoid rewriting a bunch of config files.

However executing mkdir /srv/www results in permission denied. Using both sudo as executing it as a su does not resolve the error.

Permissions of /srv are set to drwxr-xr-x and I'm only using a single disk that's mounted on /. No nfs shares.

7
  • Debian 9 (Stretch) is out of security support since 2020, and even the long-time support ended a year ago. You do not set up a "new" webserver on that — that's just irresponsible. To me this sounds like you're replicating some legacy system for a reason, but without knowing that reason, any answer I might give here could just counteract the actual purpose of your setup. So could you please tell us why specifically you're using debian 9 instead of a current debian? Commented May 29, 2023 at 8:33
  • -Can you also log in with the root user? -Is it the same server or environment as before? (Virtualisation, hypervisor - there are differences between providers). By using df -h, you can see the file system and mounting point
    – Remo
    Commented May 29, 2023 at 9:29
  • Perhaps an attributes problem. Try lsattr -d /srv. If it shows an 'i' flag, then run chattr -i /srv and it should be ok. Oh, and @MarcusMüller is right, do no use an outdated distribution !!
    – binarym
    Commented May 29, 2023 at 9:29
  • I'm using Debian 9 to step-wise upgrade a deployment of a webserver. Due to requirements I cannot update to the latest release directly. I am fully aware of the fact it is not secure.
    – user574007
    Commented May 29, 2023 at 9:34
  • lsattr: Inappropriate ioctl for device While reading flags on /srv @binarym
    – user574007
    Commented May 29, 2023 at 9:36

1 Answer 1

0

Apparently my /srv directory was mounted as ro. This could not be seen using df -t yet showed up using mount. Remounting using the appropriate permissions solved it.

You must log in to answer this question.