Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 08-31-2006, 01:49 PM   #1 (permalink)
metazai
Regular Contributor
 
Join Date: Apr 2004
Location: Orange County, CA
Posts: 136
metazai is on a distinguished road
file permissions with php

Building a CMS, and in it allowing people to create/delete files, but I also want people to be able to make manual edits to the files through FTP if they so wish. I've got it coded so the CMS reads the file directly. Here's my question, though . . . is there a way to set file permissions when using fopen to create a file on the server? The files are defaulting to 644, which is fine and dandy but won't allow someone to FTP any changes to the file.

I'm aware of the security issues . . . just want to know if this is something that is possible to do. Any thoughts?
metazai is offline   Reply With Quote
Old 08-31-2006, 03:37 PM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,175
Belisarius is on a distinguished road
There's a chmod function. I assume that'll work for you.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 08-31-2006, 03:40 PM   #3 (permalink)
metazai
Regular Contributor
 
Join Date: Apr 2004
Location: Orange County, CA
Posts: 136
metazai is on a distinguished road
Geez, what an idiot I am. I'd seen chmod referred to in other places on the web, but always assumed it referred to the unix command line . . .

Cool. Thanks!
metazai is offline   Reply With Quote
Old 09-02-2006, 09:12 AM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
the stuff you read probably did. php just adopted the same function name.
__________________
Mike
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make a search engine for your website with PHP zhisede PHP 3 10-25-2005 08:54 AM
does PHP talk to JAVA class file?? Keith PHP 2 06-18-2004 09:23 AM
Writing to a file. (PHP) Nasimov PHP 1 03-11-2004 06:19 AM


All times are GMT -8. The time now is 09:50 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting