User CP
Name:  
Pass:

Register
Latest News
- RO2 multi trail...
- Sneak Peak! -D...
- Affiliate News ...
- Affiliate News ...
- Affiliate News ...
- The RIAA Defeat...
- Affiliate News ...

News Archive

Top 5 Cases
Batmobile Tumbler PC

- Batmobile Tumbler PC
     Score: 81.25
- Camo Cube
     Score: 80.00
- NemoTron
     Score: 80.00
- Wall-E
     Score: 78.33
- R2-D2
     Score: 77.00


Random Rig
Case Name: Green Dragon


Site Affiliates
Xoxide.com
Newegg.com
Memory Giant
ThinkGeek Electronics1and1 Web Hosting
Modders-Inc
B.C.Modding
Benchmark Reviews
KreativePC
SteelSeries
Pimpin Rigz
Lamptron


Affiliate News


  Forum Index - Web Design - symbolic links and permissions
Author Initial Thread
nucnuc
That one guy

Joined: Apr 18, 2007
Posts: 120
Post Subject: symbolic links and permissions
Posted on: Jun 9, 2008

I want to create a symbolic link to a file.
I'm not entirely sure it will do what I want it to.

Say I have a file "/home/hidden/something.txt"
I want to be able to access this file, but only if I complete a php script.

I can use the shell to create the link and it works as I expect it to
cd /something/htdocs
ln -s /home/hidden/ testing

http://my.web.server/testing/something.txt works

Am I using this function correctly?
symlink("/home/hidden/", "testing2");

When I run this line of code I get
Warning: Symlink failed (Permission denied)
Who needs what permissions to let php create the symbolic link?


Friend's kid: Mommy, what's church?
Mommy: Church is where people go to learn about God.
kid: Who's God? Does he teach karate?
- Top - Profile - Private Message - Website - Reply

faceless105
Selfmade Modder

Joined: Jun 30, 2006
Posts: 4540
Post Subject: subject
Posted on: Jun 9, 2008


I've never tried that function before so I can't offer to much help on it. I tried your link (http://my.web.server/testing/something.txt) and I got a 502 error, not sure if that's relevant to anything.

One option to access the file is to put it into a database (using blob types), then run the query when appropriate. That seems like a lot of hassle though for something so simple doesn't it?

This is another idea that might be a lot easier but is completly untested, I'd try using .htaccess to lock the directory and then use a php script that creates link via ftp.

I also found this just borwsing google. I haven't looked to deep into it yet, but this may be something along the lines of what you're looking to do, http://koivi.com/php-http-auth/

if you're still getting stuck a bit, throw me as much info as you can about what you're looking to do and a bit of how you're looking to do it.


If con is the opposite of pro, is Congress the opposite of progress?
- Top - Profile - Private Message - Website - Quote - Reply

nucnuc
That one guy

Joined: Apr 18, 2007
Posts: 120
Post Subject: subject
Posted on: Jun 9, 2008


haha the link wasn't an actual link, just an example.

i've never used a blob before... it just holds the file as it is would be on the computer?
that could work.

would using a blob be bad for the system memory?
a quick google search said that the size of a blob is limited by system memory. Would it cause problems if a fairly large number of people were trying to get the blob at the same time?


Friend's kid: Mommy, what's church?
Mommy: Church is where people go to learn about God.
kid: Who's God? Does he teach karate?
- Top - Profile - Private Message - Website - Quote - Reply

faceless105
Selfmade Modder

Joined: Jun 30, 2006
Posts: 4540
Post Subject: subject
Posted on: Jun 9, 2008


blobs are kind of an inconvenient necessity. i've read about people splitting a file into a number of blob entries to cut down on memory usage at any given moment. and they do take a fair time longer to load since they're being pulled from the database. One of the sites I work on has a file upload option and it's a load balanced server. lol we're technically not susposed to allow uploads to the servers, but if it's what the client wants it's what they get. so when they upload the file, it gets placed on the server they're running off of (since they aren't fans of this happening, thus no syncing options), we upload to the DB. it's kind of annoying, but it serves it's purpose. There are other benefits too but i can't think of them for the life of me, lol.


If con is the opposite of pro, is Congress the opposite of progress?
- Top - Profile - Private Message - Website - Quote - Reply

abusiv3


Joined: Dec 22, 2007
Posts: 453
Post Subject: subject
Posted on: Jun 9, 2008


there is a free no download scratch pad if you google scratch pad.
it lets you compile all sorts of code and then execute.

sort of like dry running your dry test for water cooling systems

idk if that helps at all hope it does...


**safety note**

try not to think of the price of the part your cutting in half.
- Top - Profile - Private Message - Quote - Reply

faceless105
Selfmade Modder

Joined: Jun 30, 2006
Posts: 4540
Post Subject: subject
Posted on: Jun 9, 2008


haha i dunno about you guys but i keep an old pc here at home set aside as a dev box.

I work full time as a web developer so it's probably not that strange


If con is the opposite of pro, is Congress the opposite of progress?
- Top - Profile - Private Message - Website - Quote - Reply

nucnuc
That one guy

Joined: Apr 18, 2007
Posts: 120
Post Subject: subject
Posted on: Jun 9, 2008


nope not really

I have my own personal laptop which is running apache that I do the coding and basic testing on. The company has the main web server, and a test server (which started out as a copy of the live server, and has fallen behind from there, but it is still similar enough for my current purposes).

Unless you are doing plain html you will probably want some kind of test machine.


Friend's kid: Mommy, what's church?
Mommy: Church is where people go to learn about God.
kid: Who's God? Does he teach karate?
- Top - Profile - Private Message - Website - Quote - Reply

nucnuc
That one guy

Joined: Apr 18, 2007
Posts: 120
Post Subject: subject
Posted on: Jun 9, 2008


I see what I was doing wrong. I only gave myself the right permissions in the source folder, I needed to do the same in the link's containing folder too.

working now.


Friend's kid: Mommy, what's church?
Mommy: Church is where people go to learn about God.
kid: Who's God? Does he teach karate?
- Top - Profile - Private Message - Website - Quote - Reply







FusionMods.Net

Total Time: 2.53854