-2

I'm going to permit redirections ">>" and ">" for the www-data user in sudoers but I can't find this.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
  • Output redirection is a shell feature. sudoers manages program invocations. Filesystem permissions limit users' access to files. Please decide what you want to use. – Hermann Apr 27 '19 at 09:12
  • I have access to file, but I wanna add >> and > to sudoers for becoming as a passwordless synthax – farshad khazaee Apr 27 '19 at 09:40

1 Answers1

0

There is a conceptual problem here.

If you allow www-data to have access to a shell that allows redirection (for example bash), that user is allowed to do redirection.

However, the user must have write permission on the directory or file where the redirection goes to (write on directory if you want to create new files).

Ljm Dullaart
  • 4,643