csv file and file permissions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dilbert137
Forum Commoner
Posts: 57
Joined: Sat Jun 02, 2007 5:02 am
Location: Mauritius

csv file and file permissions

Post by Dilbert137 »

Dear All,

I'm searching for a documentation on file write access and user connection on linux environment. For example your folders are protected and that anonymous user haven't access writes. You have created user xyz which only have write permission. How to make php connect to this user and write the file you requested.

Thanks from helping
Dilbert137
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: csv file and file permissions

Post by requinix »

...Are you talking about FTP?
Dilbert137
Forum Commoner
Posts: 57
Joined: Sat Jun 02, 2007 5:02 am
Location: Mauritius

Re: csv file and file permissions

Post by Dilbert137 »

No not ftp but a creation of file which need a specific user so that to be created else it says denied.

Regards
Dilbert137
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: csv file and file permissions

Post by requinix »

*nix isn't as powerful as Windows' NTFS when it comes to file permissions: you can't give specific privileges to specific users.

If you want something to be read-/writeable by a user and completely blocked for everyone else, change ownership of it to that user and set the permissions as 0600 (for files; 0700 for directories).

But I still don't get what
Dilbert137 wrote:How to make php connect to this user and write the file you requested.
means. "Connect"? Write what file who requested?
Dilbert137
Forum Commoner
Posts: 57
Joined: Sat Jun 02, 2007 5:02 am
Location: Mauritius

Re: csv file and file permissions

Post by Dilbert137 »

Yes i understand that write permission must be set but don't forget hackers who want to get control of your website and do illegal things. Thus i would like to know if i can write a script connecting to a specific user who have write access and create my file. Not letting write access to everyone which can lead to few hackers visits.

Regards
Dilbert137
Post Reply