Re: [PHP] Permissions issue on share
On 3/23/07, Jim Lucas [EMAIL PROTECTED] wrote: Rahul Sitaram Johari wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² you could always change apache to run as the user/group that the mount is set to. Sorry you had to spend 6 hours hunting down a 2 second fix. Not sure why no one else suggested this. If it is a local copy of Apache and not used by anybody else, who cares about what permissions it runs as. Jim Running apache as root is quite hard... He was mounting his shares as root so then apache would need to run as root. And that probably requires recompiling of Apache. And i provided a quite secure way to fix, but Mac OS X didn't understand that. Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks You could chmod the whole share to 777 but that might give problems! Or make sure the user apache runs on has write access to the share. But normal each file is set with permission 755, means that only the owner can write to it. I'm not able to give a real fix right now, but it is quite complicated :( Tijnema ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
rahul:~/Documents/XFER rjohari$ ls -la osm total 26548 drwxr-xr-x 1 rjohari rjohari16384 31 Dec 1969 . drwxr-xr-x 5 rjohari rjohari 170 22 Mar 12:08 .. -rwxr-xr-x 1 rjohari rjohari21508 13 Sep 2006 .DS_Store -rwxr-xr-x 1 rjohari rjohari 82 14 Sep 2006 ._Temporary Items -rwxr-xr-x 1 rjohari rjohari 945181 22 Mar 09:44 ALL.dbf drwxr-xr-x 1 rjohari rjohari16384 22 Mar 13:27 DISPO -rwxr-xr-x 1 rjohari rjohari 4608 28 Feb 14:04 HFGLEND.CDX -rwxr-xr-x 1 rjohari rjohari 6172 28 Feb 14:04 HFGLEND.DBF -rwxr-xr-x 1 rjohari rjohari 4608 28 Feb 14:04 HFMESA.CDX -rwxr-xr-x 1 rjohari rjohari 6172 28 Feb 14:04 HFMESA.DBF -rwxr-xr-x 1 rjohari rjohari 4608 28 Feb 14:04 HFPHENX.CDX -rwxr-xr-x 1 rjohari rjohari 6172 28 Feb 14:04 HFPHENX.DBF -rwxr-xr-x 1 rjohari rjohari 6435 7 Nov 15:15 HFUND.DBF -rwxr-xr-x 1 rjohari rjohari 642844 7 Nov 15:15 OSM.DBF -rwxr-xr-x 1 rjohari rjohari 142848 21 Mar 19:57 OSMH.CDX -rwxr-xr-x 1 rjohari rjohari 1820024 21 Mar 19:58 OSMH.DBF -rwxr-xr-x 1 rjohari rjohari12288 21 Mar 19:42 OSMT.CDX -rwxr-xr-x 1 rjohari rjohari 3072 16 Nov 14:03 TEST.CDX -rwxr-xr-x 1 rjohari rjohari12804 16 Nov 14:51 TEST.DBF -rwxr-xr-x 1 rjohari rjohari 7116 21 Sep 17:02 TEST_RUN.DBF -rwxr-xr-x 1 rjohari rjohari 4608 2 Mar 13:44 TRANSBX.CDX -rwxr-xr-x 1 rjohari rjohari 714 21 Mar 17:13 TRANSBX.DBF -rwxr-xr-x 1 rjohari rjohari 191 31 Oct 17:53 TRANSDIR.DBF drwxr-xr-x 1 rjohari rjohari16384 14 Sep 2006 Temporary Items -rwxr-xr-x 1 rjohari rjohari 4608 21 Feb 21:00 dmam.CDX -rwxr-xr-x 1 rjohari rjohari22752 21 Feb 21:01 dmam.DBF -rwxr-xr-x 1 rjohari rjohari54784 22 Mar 08:25 novastar.CDX -rwxr-xr-x 1 rjohari rjohari 6490610 22 Mar 08:25 novastar.DBF -rwxr-xr-x 1 rjohari rjohari44032 3 Nov 13:53 osm.CDX -rwxr-xr-x 1 rjohari rjohari 573 20 Sep 2006 osm_move.FXP -rwxr-xr-x 1 rjohari rjohari 407 20 Sep 2006 osm_move.prg -rwxr-xr-x 1 rjohari rjohari40448 29 Dec 15:41 osma.CDX -rwxr-xr-x 1 rjohari rjohari 486992 29 Dec 15:41 osma.DBF -rwxr-xr-x 1 rjohari rjohari 4608 21 Mar 16:05 osmf.CDX -rwxr-xr-x 1 rjohari rjohari 132180 21 Mar 16:05 osmf.DBF -rwxr-xr-x 1 rjohari rjohari89088 28 Feb 18:57 osmj.CDX -rwxr-xr-x 1 rjohari rjohari 1098794 28 Feb 18:57 osmj.DBF -rwxr-xr-x 1 rjohari rjohari31232 21 Mar 19:43 osmn.CDX -rwxr-xr-x 1 rjohari rjohari 319534 21 Mar 19:43 osmn.DBF -rwxr-xr-x 1 rjohari rjohari31744 21 Mar 19:22 osmp.CDX -rwxr-xr-x 1 rjohari rjohari 372590 21 Mar 19:22 osmp.DBF -rwxr-xr-x 1 rjohari rjohari 659424 21 Mar 19:42 osmt.dbf -rwxr-xr-x 1 rjohari rjohari 314 7 Nov 11:02 transbr2.DBF -rwxr-xr-x 1 rjohari rjohari 314 7 Nov 17:19 transbranch.DBF -rwxr-xr-x 1 rjohari rjohari11264 21 Sep 16:47 warm092106.xls On 3/22/07 12:31 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Well chmod is certainly not doing anything. I tried that to begin with. I don't get an error, but it doesn't change any permissions. Just doesn't do anything to the permissions of the file/folder. Like it's just ignored. I did it as root using sudo. Can you post the log of the ls -la Share command here? Tijnema On 3/22/07 12:18 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Or make sure the user apache runs on has write access to the share. That's the problem I'm facing. I'm not sure how to do that. If I'm not mistaken, Apache runs as user nobody on my Mac, but I don't know how to give that user write access on the Windows Machine. Yes, it is quite complicated :( I believe this has nothing to do with your windows machine, but with the mount on your Mac. I'm not very familiar with Mac OS X (Although i have installed it) I know it's based on a linux kernel, and uses same mount tools. I think a simple chmod 777 to the mount folder would do the job. so if you have it mounted at /Share chmod 777 /Share I believe that windows mounts everything with chmod value 777, so that shouldn't be a problem. Tijnema On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get
Re: [PHP] Permissions issue on share
On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: rahul:~/Documents/XFER rjohari$ ls -la osm total 26548 drwxr-xr-x 1 rjohari rjohari16384 31 Dec 1969 . drwxr-xr-x 5 rjohari rjohari 170 22 Mar 12:08 .. -rwxr-xr-x 1 rjohari rjohari21508 13 Sep 2006 .DS_Store [snip] -rwxr-xr-x 1 rjohari rjohari11264 21 Sep 16:47 warm092106.xls I was guessing that, all files and folders have the 755 permission..., meaning that the owner can edit, but the group and all other can't. I did some googling for you, and you should mount your share with -o fmask=777,dmask=777 so your example mount command becomes: mount t smbfs -o fmask=777,dmask=777 //[EMAIL PROTECTED]/ShareName Share that should do it :) Tijnema On 3/22/07 12:31 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Well chmod is certainly not doing anything. I tried that to begin with. I don't get an error, but it doesn't change any permissions. Just doesn't do anything to the permissions of the file/folder. Like it's just ignored. I did it as root using sudo. Can you post the log of the ls -la Share command here? Tijnema On 3/22/07 12:18 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Or make sure the user apache runs on has write access to the share. That's the problem I'm facing. I'm not sure how to do that. If I'm not mistaken, Apache runs as user nobody on my Mac, but I don't know how to give that user write access on the Windows Machine. Yes, it is quite complicated :( I believe this has nothing to do with your windows machine, but with the mount on your Mac. I'm not very familiar with Mac OS X (Although i have installed it) I know it's based on a linux kernel, and uses same mount tools. I think a simple chmod 777 to the mount folder would do the job. so if you have it mounted at /Share chmod 777 /Share I believe that windows mounts everything with chmod value 777, so that shouldn't be a problem. Tijnema On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks You could chmod the whole share to 777 but that might give problems! Or make sure the user apache runs on has write access to the share. But normal each file is set with permission 755, means that only the owner can write to it. I'm not able to give a real fix right now, but it is quite complicated :( Tijnema ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Or make sure the user apache runs on has write access to the share. That's the problem I'm facing. I'm not sure how to do that. If I'm not mistaken, Apache runs as user nobody on my Mac, but I don't know how to give that user write access on the Windows Machine. Yes, it is quite complicated :( I believe this has nothing to do with your windows machine, but with the mount on your Mac. I'm not very familiar with Mac OS X (Although i have installed it) I know it's based on a linux kernel, and uses same mount tools. I think a simple chmod 777 to the mount folder would do the job. so if you have it mounted at /Share chmod 777 /Share I believe that windows mounts everything with chmod value 777, so that shouldn't be a problem. Tijnema On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks You could chmod the whole share to 777 but that might give problems! Or make sure the user apache runs on has write access to the share. But normal each file is set with permission 755, means that only the owner can write to it. I'm not able to give a real fix right now, but it is quite complicated :( Tijnema ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
Ave, Or make sure the user apache runs on has write access to the share. That's the problem I'm facing. I'm not sure how to do that. If I'm not mistaken, Apache runs as user nobody on my Mac, but I don't know how to give that user write access on the Windows Machine. Yes, it is quite complicated :( On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks You could chmod the whole share to 777 but that might give problems! Or make sure the user apache runs on has write access to the share. But normal each file is set with permission 755, means that only the owner can write to it. I'm not able to give a real fix right now, but it is quite complicated :( Tijnema ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Well chmod is certainly not doing anything. I tried that to begin with. I don't get an error, but it doesn't change any permissions. Just doesn't do anything to the permissions of the file/folder. Like it's just ignored. I did it as root using sudo. Can you post the log of the ls -la Share command here? Tijnema On 3/22/07 12:18 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Or make sure the user apache runs on has write access to the share. That's the problem I'm facing. I'm not sure how to do that. If I'm not mistaken, Apache runs as user nobody on my Mac, but I don't know how to give that user write access on the Windows Machine. Yes, it is quite complicated :( I believe this has nothing to do with your windows machine, but with the mount on your Mac. I'm not very familiar with Mac OS X (Although i have installed it) I know it's based on a linux kernel, and uses same mount tools. I think a simple chmod 777 to the mount folder would do the job. so if you have it mounted at /Share chmod 777 /Share I believe that windows mounts everything with chmod value 777, so that shouldn't be a problem. Tijnema On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks You could chmod the whole share to 777 but that might give problems! Or make sure the user apache runs on has write access to the share. But normal each file is set with permission 755, means that only the owner can write to it. I'm not able to give a real fix right now, but it is quite complicated :( Tijnema ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
Ave, Certainly looks very promising, but is giving me: mount_smbfs: -o fmask=: option not supported Let me google it too, see what I can come up with. Appreciate it a lot mate. On 3/22/07 12:48 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: rahul:~/Documents/XFER rjohari$ ls -la osm total 26548 drwxr-xr-x 1 rjohari rjohari16384 31 Dec 1969 . drwxr-xr-x 5 rjohari rjohari 170 22 Mar 12:08 .. -rwxr-xr-x 1 rjohari rjohari21508 13 Sep 2006 .DS_Store [snip] -rwxr-xr-x 1 rjohari rjohari11264 21 Sep 16:47 warm092106.xls I was guessing that, all files and folders have the 755 permission..., meaning that the owner can edit, but the group and all other can't. I did some googling for you, and you should mount your share with -o fmask=777,dmask=777 so your example mount command becomes: mount t smbfs -o fmask=777,dmask=777 //[EMAIL PROTECTED]/ShareName Share that should do it :) Tijnema On 3/22/07 12:31 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Well chmod is certainly not doing anything. I tried that to begin with. I don't get an error, but it doesn't change any permissions. Just doesn't do anything to the permissions of the file/folder. Like it's just ignored. I did it as root using sudo. Can you post the log of the ls -la Share command here? Tijnema On 3/22/07 12:18 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Or make sure the user apache runs on has write access to the share. That's the problem I'm facing. I'm not sure how to do that. If I'm not mistaken, Apache runs as user nobody on my Mac, but I don't know how to give that user write access on the Windows Machine. Yes, it is quite complicated :( I believe this has nothing to do with your windows machine, but with the mount on your Mac. I'm not very familiar with Mac OS X (Although i have installed it) I know it's based on a linux kernel, and uses same mount tools. I think a simple chmod 777 to the mount folder would do the job. so if you have it mounted at /Share chmod 777 /Share I believe that windows mounts everything with chmod value 777, so that shouldn't be a problem. Tijnema On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks You could chmod the whole share to 777 but that might give problems! Or make sure the user apache runs on has write access to the share. But normal each file is set with permission 755, means that only the owner can write to it. I'm not able to give a real fix right now, but it is quite complicated :( Tijnema ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
Well chmod is certainly not doing anything. I tried that to begin with. I don't get an error, but it doesn't change any permissions. Just doesn't do anything to the permissions of the file/folder. Like it's just ignored. I did it as root using sudo. On 3/22/07 12:18 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Or make sure the user apache runs on has write access to the share. That's the problem I'm facing. I'm not sure how to do that. If I'm not mistaken, Apache runs as user nobody on my Mac, but I don't know how to give that user write access on the Windows Machine. Yes, it is quite complicated :( I believe this has nothing to do with your windows machine, but with the mount on your Mac. I'm not very familiar with Mac OS X (Although i have installed it) I know it's based on a linux kernel, and uses same mount tools. I think a simple chmod 777 to the mount folder would do the job. so if you have it mounted at /Share chmod 777 /Share I believe that windows mounts everything with chmod value 777, so that shouldn't be a problem. Tijnema On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks You could chmod the whole share to 777 but that might give problems! Or make sure the user apache runs on has write access to the share. But normal each file is set with permission 755, means that only the owner can write to it. I'm not able to give a real fix right now, but it is quite complicated :( Tijnema ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Certainly looks very promising, but is giving me: mount_smbfs: -o fmask=: option not supported Let me google it too, see what I can come up with. Appreciate it a lot mate. Hmm, i googled a little bit, and i found a norwegian site with some kind of same problem, and from what i understand they say it is that the Mac OS X implementation of Samba doesn't accept any configuration options. But they don't tell how to fix (or i don't understand.. LOL) Maybe updating to latest samba will do the job, but this is totally not PHP related. You are better off going to the samba list. so have a look here: https://lists.samba.org/mailman/ Tijnema On 3/22/07 12:48 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: rahul:~/Documents/XFER rjohari$ ls -la osm total 26548 drwxr-xr-x 1 rjohari rjohari16384 31 Dec 1969 . drwxr-xr-x 5 rjohari rjohari 170 22 Mar 12:08 .. -rwxr-xr-x 1 rjohari rjohari21508 13 Sep 2006 .DS_Store [snip] -rwxr-xr-x 1 rjohari rjohari11264 21 Sep 16:47 warm092106.xls I was guessing that, all files and folders have the 755 permission..., meaning that the owner can edit, but the group and all other can't. I did some googling for you, and you should mount your share with -o fmask=777,dmask=777 so your example mount command becomes: mount t smbfs -o fmask=777,dmask=777 //[EMAIL PROTECTED]/ShareName Share that should do it :) Tijnema On 3/22/07 12:31 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Well chmod is certainly not doing anything. I tried that to begin with. I don't get an error, but it doesn't change any permissions. Just doesn't do anything to the permissions of the file/folder. Like it's just ignored. I did it as root using sudo. Can you post the log of the ls -la Share command here? Tijnema On 3/22/07 12:18 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Or make sure the user apache runs on has write access to the share. That's the problem I'm facing. I'm not sure how to do that. If I'm not mistaken, Apache runs as user nobody on my Mac, but I don't know how to give that user write access on the Windows Machine. Yes, it is quite complicated :( I believe this has nothing to do with your windows machine, but with the mount on your Mac. I'm not very familiar with Mac OS X (Although i have installed it) I know it's based on a linux kernel, and uses same mount tools. I think a simple chmod 777 to the mount folder would do the job. so if you have it mounted at /Share chmod 777 /Share I believe that windows mounts everything with chmod value 777, so that shouldn't be a problem. Tijnema On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks You could chmod the whole share to 777 but that might give problems! Or make sure the user apache runs on has write access to the share. But normal each file is set with permission 755, means that only the owner can write to it. I'm not able to give a real fix right now, but it is quite complicated :( Tijnema ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
Yes, it does appear that samba on mac os x is not taking any configuration options. I tried different options for the mount_smbfs command which does have very specific user/owner/group related permissions options - but all give me the same operation not supported error. Let me take a closer look at Samba and also the list you linked to. Thanks again - appreciate your help! On 3/22/07 2:21 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Certainly looks very promising, but is giving me: mount_smbfs: -o fmask=: option not supported Let me google it too, see what I can come up with. Appreciate it a lot mate. Hmm, i googled a little bit, and i found a norwegian site with some kind of same problem, and from what i understand they say it is that the Mac OS X implementation of Samba doesn't accept any configuration options. But they don't tell how to fix (or i don't understand.. LOL) Maybe updating to latest samba will do the job, but this is totally not PHP related. You are better off going to the samba list. so have a look here: https://lists.samba.org/mailman/ Tijnema On 3/22/07 12:48 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: rahul:~/Documents/XFER rjohari$ ls -la osm total 26548 drwxr-xr-x 1 rjohari rjohari16384 31 Dec 1969 . drwxr-xr-x 5 rjohari rjohari 170 22 Mar 12:08 .. -rwxr-xr-x 1 rjohari rjohari21508 13 Sep 2006 .DS_Store [snip] -rwxr-xr-x 1 rjohari rjohari11264 21 Sep 16:47 warm092106.xls I was guessing that, all files and folders have the 755 permission..., meaning that the owner can edit, but the group and all other can't. I did some googling for you, and you should mount your share with -o fmask=777,dmask=777 so your example mount command becomes: mount t smbfs -o fmask=777,dmask=777 //[EMAIL PROTECTED]/ShareName Share that should do it :) Tijnema On 3/22/07 12:31 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Well chmod is certainly not doing anything. I tried that to begin with. I don't get an error, but it doesn't change any permissions. Just doesn't do anything to the permissions of the file/folder. Like it's just ignored. I did it as root using sudo. Can you post the log of the ls -la Share command here? Tijnema On 3/22/07 12:18 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, Or make sure the user apache runs on has write access to the share. That's the problem I'm facing. I'm not sure how to do that. If I'm not mistaken, Apache runs as user nobody on my Mac, but I don't know how to give that user write access on the Windows Machine. Yes, it is quite complicated :( I believe this has nothing to do with your windows machine, but with the mount on your Mac. I'm not very familiar with Mac OS X (Although i have installed it) I know it's based on a linux kernel, and uses same mount tools. I think a simple chmod 777 to the mount folder would do the job. so if you have it mounted at /Share chmod 777 /Share I believe that windows mounts everything with chmod value 777, so that shouldn't be a problem. Tijnema On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks You could chmod the whole share to 777 but that might give problems! Or make sure the user apache runs on has write access to the share. But normal each file is set with permission 755, means that only the owner can write to it. I'm not able to give a real fix right now, but it is quite complicated :( Tijnema ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no
Re: [PHP] Permissions issue on share
Get a copy of WinSCP3 or FileZilla ftp utilities, both are free. They will show you who the owner is for the dirs and files. You can also use a SSH shell command; but, unless you are already familiar with Unix commands, using the utilities will be a lot easier and quicker. To change a file or dir when you do not own or have the proper permissions: Copy the files and dirs to your local HD Delete them on the server. Upload them from your HD to the server. Now the owner will be the ID of ftp login, that's you. Fix the permissions as needed. The files and dirs must have the others, also called world, W bit set to write and maybe the X bit also. Rahul Sitaram Johari wrote: Rahul Sitaram Johari wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
On 3/22/07, Al [EMAIL PROTECTED] wrote: Get a copy of WinSCP3 or FileZilla ftp utilities, both are free. They will show you who the owner is for the dirs and files. You can also use a SSH shell command; but, unless you are already familiar with Unix commands, using the utilities will be a lot easier and quicker. To change a file or dir when you do not own or have the proper permissions: Copy the files and dirs to your local HD Delete them on the server. Upload them from your HD to the server. Now the owner will be the ID of ftp login, that's you. Fix the permissions as needed. The files and dirs must have the others, also called world, W bit set to write and maybe the X bit also. So you would recommend a recursive chmod? as long as there's no OS installed it wouldn't do a lot, but of course this would remove a little bit security. (Not that there's a lot of security with windows...:P) But i think that when remounting the partitition, the permissions are reset too. That's why there are options like fmask and dmask :) but somehow they don't work on Mac OS X. Tijnema Rahul Sitaram Johari wrote: Rahul Sitaram Johari wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
Ave, But i think that when remounting the partitition, the permissions are reset too. Unfortunately you're absolutely right! The share is re-mounted on a daily basis (along with a reboot), and thus, even if the 'copy, delete from server, copy to server' process were to work, with every unmount remount, it would go back to original permissions ownership. Fmask, dmask and for that matter some other mount_smbfs options I found are an accurate solution to this problem - but unfortunately they don't work on Mac OS X, or the Samba that comes with mac os x, one or the other. I know this is gone completely out of PHP context, but I do appreciate you guys helping out. I'm just not finding any solution for this. I think I've gone through 100 websites googling different combinations. On 3/22/07 3:14 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Al [EMAIL PROTECTED] wrote: Get a copy of WinSCP3 or FileZilla ftp utilities, both are free. They will show you who the owner is for the dirs and files. You can also use a SSH shell command; but, unless you are already familiar with Unix commands, using the utilities will be a lot easier and quicker. To change a file or dir when you do not own or have the proper permissions: Copy the files and dirs to your local HD Delete them on the server. Upload them from your HD to the server. Now the owner will be the ID of ftp login, that's you. Fix the permissions as needed. The files and dirs must have the others, also called world, W bit set to write and maybe the X bit also. So you would recommend a recursive chmod? as long as there's no OS installed it wouldn't do a lot, but of course this would remove a little bit security. (Not that there's a lot of security with windows...:P) But i think that when remounting the partitition, the permissions are reset too. That's why there are options like fmask and dmask :) but somehow they don't work on Mac OS X. Tijnema Rahul Sitaram Johari wrote: Rahul Sitaram Johari wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permissions issue on share
On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, But i think that when remounting the partitition, the permissions are reset too. Unfortunately you're absolutely right! The share is re-mounted on a daily basis (along with a reboot), and thus, even if the 'copy, delete from server, copy to server' process were to work, with every unmount remount, it would go back to original permissions ownership. Fmask, dmask and for that matter some other mount_smbfs options I found are an accurate solution to this problem - but unfortunately they don't work on Mac OS X, or the Samba that comes with mac os x, one or the other. I know this is gone completely out of PHP context, but I do appreciate you guys helping out. I'm just not finding any solution for this. I think I've gone through 100 websites googling different combinations. You could try to update to the latest version (maybe even from CVS), i'm not sure if it helps, but if it is fixed, it is done in a later version :) And if it doesn't, you could submit a bug ticket at samba. Tijnema On 3/22/07 3:14 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Al [EMAIL PROTECTED] wrote: Get a copy of WinSCP3 or FileZilla ftp utilities, both are free. They will show you who the owner is for the dirs and files. You can also use a SSH shell command; but, unless you are already familiar with Unix commands, using the utilities will be a lot easier and quicker. To change a file or dir when you do not own or have the proper permissions: Copy the files and dirs to your local HD Delete them on the server. Upload them from your HD to the server. Now the owner will be the ID of ftp login, that's you. Fix the permissions as needed. The files and dirs must have the others, also called world, W bit set to write and maybe the X bit also. So you would recommend a recursive chmod? as long as there's no OS installed it wouldn't do a lot, but of course this would remove a little bit security. (Not that there's a lot of security with windows...:P) But i think that when remounting the partitition, the permissions are reset too. That's why there are options like fmask and dmask :) but somehow they don't work on Mac OS X. Tijnema Rahul Sitaram Johari wrote: Rahul Sitaram Johari wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List
Re: [PHP] Permissions issue on share - SOLVED!!
Ave, I can't believe I'm saying this, but SOLVED it! Took me about 6 hours, and this one website, with this one little snippet in one corner of a black white page on the ENTIRE Internet gave me a solution with this guy who had the same problem - and he wrote fixed it for me, hope it helps someone else - Well, if he ever came to town, beer would be on the house :) Believe it or not, two simple little parameters to the mount_smbfs command did the trick. mount_smbfs -u 70 -g 70 //[EMAIL PROTECTED]/ShareName SharePoint Explanation: First foremost, this does not work with the mount command (mount -t smbfs) which is what I was using. It only works with the mount_smbfs command. Basically you have to specify the uid gid, that is, the UserID and the GroupID that you want to specify as Owner Group of the mounted share. In my case, 70 is the uid gid of Apache Web Server on Mac OS X. With the -u 70 -g 70 specifying Apache Web Server, of the mounted share, Apache got read/write permissions to anything on the mounted share. Suddenly I was able to write to files using PHP/Apache on that share! Actually it's a useful command because once you determine UID GID of a User/Group that you want to specify for a mounted share, you can tighten security and really take control of permission sets for a mounted share. snip: I used NetInfo Manager to find out uid gid of Apache Web Server on my Mac OS X. Hope this helps someone else ;) ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² On 3/22/07 3:32 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Rahul Sitaram Johari [EMAIL PROTECTED] wrote: Ave, But i think that when remounting the partitition, the permissions are reset too. Unfortunately you're absolutely right! The share is re-mounted on a daily basis (along with a reboot), and thus, even if the 'copy, delete from server, copy to server' process were to work, with every unmount remount, it would go back to original permissions ownership. Fmask, dmask and for that matter some other mount_smbfs options I found are an accurate solution to this problem - but unfortunately they don't work on Mac OS X, or the Samba that comes with mac os x, one or the other. I know this is gone completely out of PHP context, but I do appreciate you guys helping out. I'm just not finding any solution for this. I think I've gone through 100 websites googling different combinations. You could try to update to the latest version (maybe even from CVS), i'm not sure if it helps, but if it is fixed, it is done in a later version :) And if it doesn't, you could submit a bug ticket at samba. Tijnema On 3/22/07 3:14 PM, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Al [EMAIL PROTECTED] wrote: Get a copy of WinSCP3 or FileZilla ftp utilities, both are free. They will show you who the owner is for the dirs and files. You can also use a SSH shell command; but, unless you are already familiar with Unix commands, using the utilities will be a lot easier and quicker. To change a file or dir when you do not own or have the proper permissions: Copy the files and dirs to your local HD Delete them on the server. Upload them from your HD to the server. Now the owner will be the ID of ftp login, that's you. Fix the permissions as needed. The files and dirs must have the others, also called world, W bit set to write and maybe the X bit also. So you would recommend a recursive chmod? as long as there's no OS installed it wouldn't do a lot, but of course this would remove a little bit security. (Not that there's a lot of security with windows...:P) But i think that when remounting the partitition, the permissions are reset too. That's why there are options like fmask and dmask :) but somehow they don't work on Mac OS X. Tijnema Rahul Sitaram Johari wrote: Rahul Sitaram Johari wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder.
Re: [PHP] Permissions issue on share
Rahul Sitaram Johari wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X as a share using the ³mount t smbfs //[EMAIL PROTECTED]/ShareName Share². The ³user² has full read-write permission and physically I¹m able to do anything I want sitting on my Mac OS X in this share, like create, delete or modify files. The problem is, I don¹t think Apache Web Server (or PHP) has write access on this share. In PHP, I¹m able to read data from files on this share, but I¹m not able to write data to any file on that share. I get access is denied. Is there anyway through PHP to give Apache or PHP write access to the files on this share? I don¹t see how I can provide Apache Web Server (installed on my Mac) Write Access through the Windows System that has the original folder. Windows is only able to provide the Mac User with Permissions, not Apache. Any help would be appreciated. Thanks ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely² you could always change apache to run as the user/group that the mount is set to. Sorry you had to spend 6 hours hunting down a 2 second fix. Not sure why no one else suggested this. If it is a local copy of Apache and not used by anybody else, who cares about what permissions it runs as. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php