Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-17-2006, 02:32 AM   #1
Senior Member
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 9.2
Posts: 1,062

Rep: Reputation: 48
file access/permissions

We need to have some user files normally readable but writable only through a program (html textarea).
For example the permissions of the files could be 400 or 444 but this program needs to set it to 600 or 660 or 666 (whatever) for the duration of the program which is run by the user.

What's the most convenient way of doing this? (Probably using PHP?)

Thank you for your help.

Last edited by rblampain; 01-17-2006 at 02:34 AM.
Old 01-17-2006, 09:03 AM   #2
Senior Member
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148

First of all don't make it world writable unless you want to face the security issues that poses. If you are running php then that script will be run by the web server, so give the web server user (apache?) write permissions, either by making it the owner of the file or by belonging to the group.

Second make sure that you properly validate the data before writing it to the file.

Old 01-18-2006, 01:11 AM   #3
Senior Member
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 9.2
Posts: 1,062

Original Poster
Rep: Reputation: 48
Excellent. Thank you.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
fat32 file access permissions wwnexc Linux - Security 2 09-05-2005 11:04 PM
File access permissions gumbald Slackware 4 10-22-2004 09:23 PM
Permissions, File, Directory access tHcnunz Linux - Newbie 3 03-26-2004 10:25 AM
Samba file access permissions bryanl Linux - Networking 0 01-04-2004 06:16 PM
file permissions on VFAT partition - access denied cevjr Linux - Security 3 09-04-2003 05:50 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration