PresFox wrote: ↑2018/06/08 20:26:02
Hello,
I have a text file on my domain that i want to view in browser,
Permissions and ownership are set like other files in the directory, but i still get a 403 error, what is wrong?
Code: Select all
ls -l
total 5960
-rw-r--r-- 1 root root 1676 Jun 8 16:23 config.txt
-rw-r--r-- 1 root root 595183 Jun 8 16:24 error.log
drwxrwxrwx 17 root root 4096 Jun 6 13:17 hook
-rw-r--r-- 1 root root 12 Jun 6 11:40 index.html
-rw-r--r-- 1 root root 5483012 Jun 8 16:24 requests.log
There are a couple ways to view a simple text file. One way is to open in a simple text editor such as vi, vim, or sublime, but my favourite way is in
Midnight Commander (mc). You can not only read text files, but also edit them if you need to.
To read the contents of any file -- not just text -- locate the file and Press
F3;
to Edit any text file Press
F4;
to Save any changes to the file Press
F2.
mc is a common utility and can easily installed:
yum install mc. To start type
"mc" in any terminal or konsole.