I have a folder in the home directory of my server named stock, as /home/stock. In this folder an ftp dump of data is being done by a third party application. The files added to these folders have a permission 644 and ownership as stock.users.
I also have a cron script which needs to access those files, uncompress it and then take further actions. My cron will run as web.users.
The problem is that my script is unable to access the files because of its permission set as 644. Is there any way to permanently set the folder's permission to 664. Executing the command chmod 664 on that folder, just changes the contents of the folder at that point of time but the files dumped in the future date still has permissions as 644.
Its also not feasible to change the permissions of the folder manually and setting a cron job to do the work doesn't seems a good option either.
Can anyone help ?
Thanks in advance.