473,378 Members | 1,236 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

no permission to access a folder my script created on a server

Mague
137 100+
Hey,

I am using a server of my friends, and i created a directory through php with exec("mkdir $dir") these are now imposible to get into and delete. (well not impsobile, impossible for a kid my age who doesnt no what they have done) It says permission denied i use smartftp and that covers everything i tihnk.has this happened to anyone before and know how to fix it!

Thanks alot
mague
Aug 26 '07 #1
10 2907
pbmods
5,821 Expert 4TB
Heya, Mague.

Changed thread title to better describe the problem (did you know that threads whose titles contain phrases such as, 'problem' actually get FEWER responses?).

First off, you'll want to use mkdir(), as then you're less likely to have these permissions errors.

You can try resetting the permissions of the folder to something more agreeable by calling:
Expand|Select|Wrap|Line Numbers
  1. chmod('/path/to/dir', 0755);
Note that the leading zero on '0755' is important.

If you get a permission denied error when you attempt to do that, you'll need to log into your server with root permissions and delete the folder. This may involve a call to your hosting provider's support team.

For more info on what's going on, check out this article.
Aug 26 '07 #2
Mague
137 100+
Hey,

I am using a server of my friends, and i created a directory through php with exec("mkdir $dir") these are now imposible to get into and delete. (well not impsobile, impossible for a kid my age who doesnt no what they have done) It says permission denied i use smartftp and that covers everything i tihnk.has this happened to anyone before and know how to fix it!

Thanks alot
mague
thanks i used the root user just if your intrested
Aug 26 '07 #3
Mague
137 100+
Hey,

i have a server, i do not have root user rights. When i use mkdir("$dir") it make the dir and the chmod is what i like it but then i cannot access it. When i try to go to it through smart ftp i get this error

[21:37:21] CWD /htdocs/graphica/testing
[21:37:21] 550 /htdocs/graphica/testing: Permission denied

I have used an online ftp thing called http://ftplive.com/ftp.php

name permissions user group date
images drwxr-xr-x flume flume Aug 26 06:38
testing drw-rw-rw- apache flume Aug 26 11:25

If there are anyidea please post them

thanks heaps
Mague
ps. 13 years old so be nice
Aug 26 '07 #4
ak1dnar
1,584 Expert 1GB
I'll give you a simple advice when using FTP tools big boy.
Never use any tool that you cannot make a trust on it. They might stole up your usernames passwords.Its my opinion.

How about using FileZilla and Feel the Freedom of the OpenSource Products.
Aug 26 '07 #5
pbmods
5,821 Expert 4TB
Merged duplicate threads.
Aug 26 '07 #6
Mague
137 100+
Thanks for the advise but this still doesn't solve my problem, this has nothing to do with my ftp program the php script creates the folder but the folder has no permissions in it. Thanks for the advise though i will stay with my SmartFTP. I will be happy if someone could help me with the problem with MKDIR() thanks

Thanks alot
Mague
Aug 26 '07 #7
pbmods
5,821 Expert 4TB
Heya, Mague.

It is unusual for PHP not to have permissions to access a folder that it has just created. This may be a symptom something funky going on in your server's Users/groups setup.

Try putting this before your mkdir() call:
Expand|Select|Wrap|Line Numbers
  1. umask(0022);
  2.  
This will set the permissions mask to 0022, which means that any files or folders you create will start out with 0755 permissions.
Aug 26 '07 #8
Mague
137 100+
Heya, Mague.

It is unusual for PHP not to have permissions to access a folder that it has just created. This may be a symptom something funky going on in your server's Users/groups setup.

Try putting this before your mkdir() call:
Expand|Select|Wrap|Line Numbers
  1. umask(0022);
  2.  
This will set the permissions mask to 0022, which means that any files or folders you create will start out with 0755 permissions.
That helped cause it gave me permission to delete it instead of having to get my friend (root user) to do it. But i still cant view it through ftp and http. There error page that comes up for the site is 403 forbidden and looks like this

Forbidden
You don't have permission to access /graphica/CoryThompson/index.php on this server.


--------------------------------------------------------------------------------

Apache/2.2.2 (Fedora) Server at flumesoft.com Port 80

I have deleted this now cause it's anoying on my server cause its not letting me use it. If you have any idea's please tell me

Thanks
Mague
ps. Read my other things for more information
Aug 27 '07 #9
pbmods
5,821 Expert 4TB
Heya, Mague.

Any chance you have an .htaccess file in there that is preventing access? A file with 0755 permissions should be readable by anybody.
Aug 27 '07 #10
Mague
137 100+
hmm i deleted all htaccess files on the server and still nothing, thanks for helping thou

Thanks more then you think
Mague
Aug 28 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Richard Muller | last post by:
Hi, I new to ASP. I have a problem with an ASP script opening a file for writing on my server. Here's how I got to this error: I downloaded a neat FileUpload ASP example from...
3
by: Yitzhak | last post by:
I am having "Permission denied" error while calling LogEvent method of WScript.Shell component. Basically, ASP page calls Windows Script Host Shell component to log events to the OS Application...
5
by: Kenny Ashton | last post by:
Can anyone tell me how to overcome my 'permissions problems' every time I upload a new database to my ISP's server. I have a folder, specially created for me by the ISP, where I can upload new...
6
by: Jean-Paul Lauque | last post by:
Hello, With my script ASP, I display list of folders and files in a directory. My problem is : when the directory is protected, I have a message an error page with "permission denied"...
12
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current...
9
by: TPS | last post by:
I have a virtual directory where all posted files are stored. The ASP app does not have rights to the share on the other server where the vir dir resides. What is the best way to give the asp...
3
by: wASP | last post by:
Hi, Apparently, I have a permissions issue. I am logged in as administrator, and my C: drive is accessible. Under the "Security" tab for Properties for Inetpub, for my "Internet Guest Account,"...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
4
by: Mukesh | last post by:
Hi all I am trying to upload and save as a picture to "root/Photos" folder in my web application. I am using this code to perform this task DirectoryInfo strFolder = new...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.