So I'm very much a novice when it comes to Apache and Ubuntu, but I know the basics (file moving, copying, editing, etc).
I was trying to remedy a problem with PHP's permissions, so I set /tmp/
and /var/tmp/
permissions to 777 using chmod
. Then, I modified both php.ini
files, in /etc/php/
and /etc/php5/
, to customize the temp directory. However, I ended up rebooting the server without actually creating the temp directory (oops).
Now I can still connect to my server through SFTP, but in Chrome when I try to connect it gives me an ERR_CONNECTION_REFUSED
. I thought it was a problem with .php
pages, so I tried loading an .html
page. Nothing. I've tried rebooting several more times, but to no avail.
In addition, my whole filesystem is read-only. So I'm assuming I messed up something in config and as a safety measure, everything is locked down. I have tried sudo su
, remounting the drive (blocked because I can't write to some config file), and a bunch of other stuff. I also get an error when doing fsck
: fsck.ext4: unable to resolve UUID: xxxxxxxx
. Again, can't auto fix any errors through remounting because I can't write to some config file.
I tried going through system logs in /var/log/
, but I couldn't find any error messages. I believe this is a problem with PHP config, but I'm not sure. I also looked at my UFW, and saw it was disabled. When trying to enable it, again, it wouldn't let me because I couldn't write to the file system. All of this is in sudo
.
Help would be greatly appreciated. Thanks!
EDIT: I managed to find my bash history as root, but nothing seems too weird: https://pastebin.com/yPh5rSE6
EDIT 2: One thing I remember is while modifying permissions for /var/tmp/
, the folder had a sticky bit; I believe the permission was drwxrwxrwt
. Was changing this a server breaking blunder? I cannot change this because I'm mounted as a read-only file system.
EDIT 3: So it seems like the issue is something with permissions, which caused an error on start up and locked the file system to read-only, messing up the web server. How plausible does this sound? The issue seems to be rooted with the UUID error showing up in two places, fsck
and mount
. How do I solve this?