LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 01-17-2006, 01:32 AM   #1
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 835

Rep: Reputation: 35
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 01:34 AM.
 
Old 01-17-2006, 08:03 AM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Hi,

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.

graeme.
 
Old 01-18-2006, 12:11 AM   #3
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 835

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


Reply


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 10:04 PM
File access permissions gumbald Slackware 4 10-22-2004 08:23 PM
Permissions, File, Directory access tHcnunz Linux - Newbie 3 03-26-2004 09:25 AM
Samba file access permissions bryanl Linux - Networking 0 01-04-2004 05:16 PM
file permissions on VFAT partition - access denied cevjr Linux - Security 3 09-04-2003 04:50 PM


All times are GMT -5. The time now is 05:40 PM.

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