1

I have a script that creates files, generates images, and then uses one of those images as an input. The problem I am running into is that when the image is created by the first part of the script, the permissions for the image are set to 664 so when the 2nd part of the script is executed, there is a "permissions denied" error. How can I accomplish this?

brad
  • 197
  • 1
  • 16
  • duplicate of http://unix.stackexchange.com/questions/47178/can-files-be-created-with-permissions-set-on-the-command-line – UKMonkey Oct 24 '16 at 11:04
  • Can the 'install' command that is proposed there be run by www-data? The reason I can't just use 'chmod' in the script is because it requires sudo permissions and granting sudo permissions to www-data is a security risk – brad Oct 24 '16 at 11:09
  • On my machine "ls -la `which install`" -rwxr-xr-x 1 root root 138840 Feb 18 2016 /usr/bin/install I leave you to take a look at it on yours to answer your own question. – UKMonkey Oct 24 '16 at 11:12

0 Answers0