I have created a Jenkins build to compile and distribute some modules. The output of the build commands (e.g., make
or ant
) is redirected to a file named build.log
.
The funny thing is that redirecting echo
into the very same file, using tee
, fails:
tee: ../../build.log: Permission denied
The file exists and has 777 permissions (checked with ls -ltrh ../..
). Any ideas what's wrong with this write?
Permissions on a file are important, but so are permissions on the super directories of that file.
If you do not have read and execute permissions on the directories you are traversing through, then you cannot follow the relative path to the file. If you lack read permissions on the directory "build.log" resides in, you cannot list the files in that directory. Read, Write, and Execute permissions do matter for directories, and they roughly map to:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With