May I know which one do you have Unix or Linux?
Is phpsuExec or suExec installed?
After generating the CSV file, what is the permission given to this file?
Simple things about directory and file permissions.
We can view directory and file permission or CHMOD as it would apply to our valuable possessions. As the rightful owner, we can control access to these possessions at all times.
The access controls can be imposed on three major user classifications.
1. Owner = this is you
2. Group = user group
3. World = you, user group, and the entire world
you can be a member of a user group, which is pretty common in linux environment.
There are three permissions that can be given to the users.
1. permission to read
2. permission to write
3. permission to execute
Integer values of the permissions.
1. Read = 4
2. Write = 2
3. Execute = 1
The loosest permission is 7 for each user group. Which is pretty scary. Most hackers can exploit any file ( NOT directory) with write permission 777 for the file.
Illustration of your current settings
At 777, this is pretty scary scenario if this applies to a file.
+---------+--------+---------+-------+
+---------+ owner + group + world +
+---------+--------+---------+-------+
+ read + 4 + 4 + 4 +
+ write + 2 + 2 + 2 +
+ Execute + 1 + 1 + 1 +
+---------+--------+---------+-------+ …