P
P
Pavel Bezrukov2016-01-15 12:25:22
linux
Pavel Bezrukov, 2016-01-15 12:25:22

How to access a file in a closed folder?

Good afternoon.
There is a root folder with 700 permissions and a file file1 inside with 644 permissions (read to all)
How can I read it to another user? If you really need it! :)
What a case, there is a host machine on it, there is a zabbix-agent and there are lxc containers, I want to monitor the web server logs without installing zabbix-agenta in each container, well, for obvious reasons, optimizing calculations ...
I tried to do links, only a hard link works, you can set your rights to it, but when the logs are rotated at night, everything naturally breaks down! :) And the symbolic one does not work.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
Yuri Yurin-Komarov, 2016-01-15
@yurymkomarov

1) Only if you log in as root
2) Make a folder with 644 permissions and write the log there

R
romy4, 2016-01-15
@romy4

And add the creation of a hard link to the rotation script?

A
abcd0x00, 2016-01-16
@abcd0x00

You can make a group to read this file.
Directory to install this group and give it the right to pass x.
Then add the user you are going to read the file to this group.
(There is also such a tool as ACL, but it should be enough for a start.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question