nadeemshafi9 Posted October 23, 2007 Share Posted October 23, 2007 hi guys my app adjusts to the linux box and mac, im having trouble finding the equivelent of chmod performed throggh php as on my linux box because i chmod the directory and then rechmod it when placing stuff there. can you tell me what the chmod command on the apple mac is ? thanks Quote Link to comment Share on other sites More sharing options...
rlindauer Posted October 23, 2007 Share Posted October 23, 2007 It's the same as linux. Go to Applications > Utilities and open Terminal.app Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 23, 2007 Share Posted October 23, 2007 yes, OS X is Unix for all intents and purposes. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted October 24, 2007 Author Share Posted October 24, 2007 so how comes when i chmod in php using the command lin thing its ok on the linux box but fails on the mac ? u see my ftp function i tell it if u on the mac dont chmod and all is fine i just GUI change the permissions onf the folder but in my script i tell it if ur on the linux box use teh chmod because it dosent chmod with teh same command on teh mac box. What im trying to say is chmod throgh PHP dosent seem to have an effect on the mac box. Quote Link to comment Share on other sites More sharing options...
derwert Posted October 24, 2007 Share Posted October 24, 2007 It's likely the user you're running as just doesn't have proper permissions to chmod those particular file(s)/dir(s) Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 24, 2007 Share Posted October 24, 2007 yes, it is unlikely (but possible) that your PHP installation and/or your http user permissions on your mac are the same on your remote server. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted October 24, 2007 Author Share Posted October 24, 2007 on my mac im running under users/Nadeem/sites and im an admin, on the linux box im a root with all the standard linux service accounts Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted October 24, 2007 Author Share Posted October 24, 2007 macs dont have root do they ? im not sure, but on the directory im trying to work with i can chmod it from one place but not the other should i use a fulkl path when chmodding throgh ftp_site or shall i use the path from where bthe script it, mi kniow chmod() dosent work but i know ftp_site chmod works in another place. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted October 24, 2007 Author Share Posted October 24, 2007 i can usualy get my head around permissions but its like this im on my machine deving and on another machine testing and hosting on a linux external and what happens is that the config needs to get changed coz the machines all have different users and stuff but somhow i have overcome it godyam apple macs. Quote Link to comment Share on other sites More sharing options...
rlindauer Posted October 24, 2007 Share Posted October 24, 2007 Macs have root. Why are you logging in as root to do simple tasks in linux? This is not apples fault. Sounds like you just need to learn more about user/group permissions under *nix. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted October 25, 2007 Author Share Posted October 25, 2007 Macs have root. Why are you logging in as root to do simple tasks in linux? This is not apples fault. Sounds like you just need to learn more about user/group permissions under *nix. sorry my mistake yes i kniow about what ur on about and i dont log in as root on the linux box i use different accounts for every app, my prob is my mac servers 2 of them one i develop on and it chmods ok when im runing apps on it and calling them from it but the other one when i call apps remotley from the other mac wich has the same setup it dosent chmod proper but it chmods ok from within so its obviously a apache account thing tghe groups wheel as with most services or i think only apache is wwheel but anywasy make some more sugestions if u can, im still using it paTCHED UP, IT CHMODS TO 0777 ON MY MAC BUT DOSENT CHMOD 0644 ? on the linux box ITS OK IN THAT IT WORKS im using ftp(chmod) and uploads and also funcs and chmod by the way its like im lost i cant map the rights in my head theres too many servers. thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.