Solved

how do i create a file with permissions set the way i want them.

Posted on 2006-11-15
3
240 Views
Last Modified: 2006-11-18
i'm using fopen to create and open a file. it creates the file however it's permissions are 0644. of course the drag is i can't edit the file in my ftp program nor change the permissions because i don't have permission.

i can't use chmod on my server. is there any way to set the permissions when you create the file??

'create file x and set the permissions to 0666' or something like that??

thanks for looking this over.
tony miceli
0
Comment
Question by:tjazzvibe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 250 total points
ID: 17952110
If PHP can create the file surely it can chmod it too?  http://us2.php.net/chmod

Alterantively, PHP will let you set the umask the same as you could on a server: http://us2.php.net/manual/en/function.umask.php

Set the umask you want first and then create the file; it should come out fine.
0
 

Author Comment

by:tjazzvibe
ID: 17952606
umask did the trick. thanks!

i can't set anything to 777, i can do 666 but 0's don't get me anywhere. ones do 666.

i don't know a ton about all this, i'm just learning. maybe i'm doing something wrong. but for now this works.

thanks for your help
tony
0
 

Author Comment

by:tjazzvibe
ID: 17952613
ps i can't use chmod at all with my server.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question