473,396 Members | 1,861 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,396 software developers and data experts.

Permission problem in Domain

Vkas
78
I have a website developed in php

Web site is working ok and the products images are being uploaded in folder (pimgs) ok if it is hosted in any other domain (www.x.com / www.abc.com )!!!
i have implemented

the pictures are uploaded ok and the images are being saved in the (pimgs) folder!!

Website also works perfectly locally also!!

i have have checked the databases , path of image uploading and all other minor issue and found clear and error free!!!

because if their would be any problem in Database or code it would not worked on the other domain where i hosted!!


Problem is
when i host the same site on the domain (www.gamehard.eu)
it works ok but the images are not uploaded in the (pimgs folder)

Some one guided me to give permission to (pimgs) folder

now how to give them !!
my pimgs folder have 4 more folder in it

should i give permission to each and every foplder seperately or i have to give permission to just (pimgs)

secondly what is the permission setting



Please Help me to solve the issue
Jan 25 '10 #1
2 1559
Atli
5,058 Expert 4TB
Hey.

What kind of access do you have to the server box?

Ideally, if you have root access to the server itself (via SSH, or something equivalent) you could issue a chown or chmod command to set the privileges of the folders you want.
For example, on my Ubuntu test box, I would issue these commands to give PHP (or rather; Apache) write access to a specific dir:
Expand|Select|Wrap|Line Numbers
  1. $ sudo chown -R www-data /var/www/path/to/pimgs
  2. $ sudo chmod -R 0755 /var/www/path/to/pimgs
This makes the user running Apache, www-data, the owner of the directory, and gives it write permission on it, while only allowing everybody else read permissions. (Note, the username may be different for your server)


If you do not have root access to the box itself, a more complex method may be required.

Commonly, shared hosts give you FTP access to the directory where you site is hosted. A good way to give PHP write access to those directories, without permanently leaving them with a to wide permission setting, is to temporarily set the permissions for the parent directory to 0777, using whichever FTP client you use - giving everybody the ability to write to it.
Then create a PHP script that creates the target directory - using mkdir -, execute it and then reset the permissions on the parent.

This should make the user executing the PHP script the owner of the target directory, giving it the ability to set the permissions as is needed.
Jan 25 '10 #2
Vkas
78
Yes thanxxxiii

i had done it very thanks
Jan 30 '10 #3

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

Similar topics

3
by: Robert Mark Bram | last post by:
Hi All! I have a piece of JavaScript that attempts to find the location.href property of another window. For example: contentWindow = window.open('', 'someWindowName'); var otherUrl =...
1
by: jonhoult | last post by:
Hi folks, I'm trying to access window opener properties for some ad code. Sometimes the launching page is in a different domain, and i need my script to recognize this fact and move on to something...
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...
4
by: Brent Bigler | last post by:
The computer: W2K server, domain controller, Microsoft.Net Framework 1.1 ======================== The error message: Access to the path "c:\fanmail\newfiles" is denied .... Exception...
4
by: BLIZZARDICE | last post by:
I will discribe my problem here but the second paragraph will discribe my setup. I have been working on a project in house and we thouhgt we were ready to move it outside for the client. However...
0
by: =?Utf-8?B?U2FsaW0=?= | last post by:
Hi .Net gurus, I have a .Net C# application. I need to set permission for a domain user on given file share. Admin specifies the file share name as \\machine-name\shared Folder and user name...
0
by: wild_bunch | last post by:
bruce barker wrote: i open another page on the same domain as A but i still can't reach permission to change a from it although they are on the same domain... did i got the wrong idea from what...
5
by: dolittle | last post by:
Hi, I`m trying to read the href property of an iframe with a javascript that running in the main frame. When the main frame and the inner iframe are both from the same domain I can read it with:...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.