[7. June 2013] Youporn available now | [19. April 2013] A-400 Advanced Network Setup | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 RC1 [13 June 2013] | A-200/A-210 RC1 [13 June 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
Problem reading network dir
06-13-2010, 10:25 AM
Post: #1
Sad Problem reading network dir
Hi,

I just have the following problem:

I'm currently busy writing a script that reads my film collection stored on my computer. The network drive is shared on the network and does not use a password. When I use the NMT and use the network browser everything works and I see all the directories. I also create a link to the network dir.

PHP Code:
#!/mnt/syb8634/server/php5-cgi
echo shell_exec('ls -l /opt/sybhttpd/localhost.drives/NETWORK_SHARE/'); 

gives:

drwxr-xr-x 4 531 500 0 May 27 2009 ..
drwxrwxrwx 2 root root 0 Jun 13 08:22 muziek
drwxrwxrwx 2 root root 0 Jun 13 08:22 films
drwxrwxrwx 2 root root 0 Jun 13 08:22 NETWORK_BROWSER
drwxr-xr-x 5 root root 0 Jun 13 08:22 .

However when I do

PHP Code:
#!/mnt/syb8634/server/php5-cgi
echo shell_exec('ls -l /opt/sybhttpd/localhost.drives/NETWORK_SHARE/films'); 

I get

drwxr-xr-x 5 root root 0 Jun 13 08:22 ..
drwxrwxrwx 2 root root 0 Jun 13 08:22 .

and I don't see any other directories.
It drives my crazy, it sounds like something with premissions, however running in 8883 mode I should have full root access.

How do I get to my files using php?
Find all posts by this user
06-13-2010, 10:41 AM
Post: #2
RE: Problem reading network dir
-l only shows information like permissions, owners, size, and when last modified

try with no switch or -a if you want to show all folders


(06-13-2010 10:25 AM)jaccoswart Wrote:  Hi,

I just have the following problem:

I'm currently busy writing a script that reads my film collection stored on my computer. The network drive is shared on the network and does not use a password. When I use the NMT and use the network browser everything works and I see all the directories. I also create a link to the network dir.

PHP Code:
#!/mnt/syb8634/server/php5-cgi
echo shell_exec('ls -l /opt/sybhttpd/localhost.drives/NETWORK_SHARE/'); 

gives:

drwxr-xr-x 4 531 500 0 May 27 2009 ..
drwxrwxrwx 2 root root 0 Jun 13 08:22 muziek
drwxrwxrwx 2 root root 0 Jun 13 08:22 films
drwxrwxrwx 2 root root 0 Jun 13 08:22 NETWORK_BROWSER
drwxr-xr-x 5 root root 0 Jun 13 08:22 .

However when I do

PHP Code:
#!/mnt/syb8634/server/php5-cgi
echo shell_exec('ls -l /opt/sybhttpd/localhost.drives/NETWORK_SHARE/films'); 

I get

drwxr-xr-x 5 root root 0 Jun 13 08:22 ..
drwxrwxrwx 2 root root 0 Jun 13 08:22 .

and I don't see any other directories.
It drives my crazy, it sounds like something with premissions, however running in 8883 mode I should have full root access.

How do I get to my files using php?

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

[Image: watched-fanart.jpg]
http://trakt.tv/downloads/popcorn-hour
Find all posts by this user
06-13-2010, 11:00 AM (This post was last modified: 06-13-2010 11:09 AM by jaccoswart.)
Post: #3
RE: Problem reading network dir
Sorry, I copy pasted the code wrongly I already used the -lart.

Some extra info, I'm trying to get to a Vista share. If I go map the public folder on Vista I can get the directory listing using PHP.

Is the normal browser of NMT using samba to get to the windows share and is that the reason that I can't get to my other shared directories when using php?

UPDATE:

I just found out why it didn't work..... Somehow you need to add everybody to the permission list in Vista to get PHP the correct privileges to see the directory listing, although it already works before in the normal NMT browser.

Thread can be closed. Smile
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  On-Demand network share mounting journey4712 347 125,887 04-20-2012 05:32 PM
Last Post: Waspoeder
  Streaming from PCH to network naight 9 3,490 02-11-2011 05:26 PM
Last Post: naight
  Stream movie audio over network Irri 0 1,490 11-06-2010 11:52 AM
Last Post: Irri
  NAS Mount problem sampras 0 1,207 11-04-2010 04:05 PM
Last Post: sampras
  Transmission and network hd hairball 3 1,845 07-08-2010 10:26 AM
Last Post: hairball
  edit network share from within a100 graf 7 2,296 07-08-2010 01:08 AM
Last Post: graf
  Problem with Mac and HDD laurasirco 18 3,571 07-04-2010 06:19 PM
Last Post: laurasirco
  Problem mounting windows shares after reset kruuth 0 1,217 06-22-2010 06:14 AM
Last Post: kruuth
  HTML problem: ol + img nexushoratio 7 4,450 06-02-2010 03:08 PM
Last Post: excal
  Re-enable the network share from command line? glorifyday 0 1,876 03-04-2010 05:06 PM
Last Post: glorifyday

Forum Jump: