How to use REST API to change "other" permissions of a file?

Comments

1 comment

  • Gido

    Hello Nikhil,

    it seems that the command is not fully correct. Please try the following, which is working in my test environment

    curl -v -k -u "nikhil:<pass>" -w"\n%{http_code}\n" -X PUT -H 'Content-Type:application/json' -d "{executable:false,readable:false,writable:false}" "http://<IP>:8080/api/filesystem/files/<UUID>/permission/others"

    In general I like to recommend to use REST call with HTTP Status Code included 

    curl -s -k -u "<user>:<pass>" -w"\n%{http_code}\n" ...

    or with additional verbose messages for debugging purpose

    curl -v -k -u "<user>:<pass>" -w"\n%{http_code}\n" ...
    0
    Comment actions Permalink

Please sign in to leave a comment.