Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

145
Visualizações
Can't follow symbolic links created by other user using root

I've created a symbolic link "foo" using my default user (jgsiqueira) at /tmp/ pointing to a file "bar" located in my home directory:

$ ln -s /home/jgsiqueira/bar /tmp/foo
$ ls -lh /tmp/ | grep foo
lrwxrwxrwx 1 jgsiqueira jgsiqueira   20 Feb 26 12:14 foo -> /home/jgsiqueira/bar

My problem is: I would like to access the content of this file with root through this symbolic link. However, it seems that root it is not allowed to follow this link:

# cat /tmp/foo
cat: /tmp/foo: Permission denied

Can someone help me help me in understand what is going on?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Interesting. After a quick test on my side, I had the same problem. And after a bit of research I found this. Turns out the problem comes from the /tmp folder itself which restricts the access to symbolic links (put your symbolic link in another folder, you'll see it works).

over 4 years ago · Santiago Trujillo Relatório

0

Your target file: /home/jgsiqueira/bar is not visible for the third group of permissions bits in the inode, this has to do with the content of the file, not the listing in an ls, this third group of permissions is normally used by rut: This has nothing to do with the symbolic link.

As root or as yourself give read permissions with:

chmod 666 /home/jgsiqueira/bar
or with symbolic notation, more flexible
chmod ugo+r /home/jgsiqueira/bar

the last use with symbolic notation means:

u: user (you)
g: group
o: other (this are the permissions bits root is going to use)

bye,
Hans

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda