Can you help me with this chmod script?
-
I have a problem with files that have been deployed in read only states. I have a script that I'm using to change the permissions from read to write. It doesn't seem to be working well as the files are still in read only. The following is the script. I need help with three things: 1. What does the php line do? 2. What does '>&' do in the first chmod line? 3. What does the last line do:? 'webmaster@atex-web-b:/dmdeploy/atex' (I believe I know what they do but since it's not working I'm looking for confirmation) #chmod -R a+x /home/atex/* /usr/local/bin/php -q /webdata/atex/php-inc/batch/sync_phpinc.… #chmod -R 755 /dmdeploy/atex >& /tmp/dmd.out echo "last deployment" > /tmp/last_dmchmod.out chmod -R 755 /webdata/atex >& /tmp/dmw.out chmod -R 777 /webdata/atex/ezpublish chmod -R 777 /webdata/data/pdf/fh/pdfs/grids chmod -R 777 /web/atex/platypus_xml webmaster@atex-web-b:/dmdeploy/atex thanks
-
Answer:
1. What does the php line do? It invokes the php script given as the first argument, you'd need to read the PHP script itself to figure out what it's actually doing. (conventionally, php scripts are run from a webserver and their output is sent to the browser, but it's just as reasonable to use it as a command-line tool. the -q flag suppresses the HTTP headers a normal script would print out, so the output is more console-friendly) 2. What does '>&' do in the first chmod line? It's a shorthand form of 2>&1, which means copy stderr to wherever stdout is being sent. 3. What does the last line do:? 'webmaster@atex-web-b:/dmdeploy/atex' That's actually just your prompt, which is configured in whatever shell you're working with.
Mark at Yahoo! Answers Visit the source
Other answers
This looks like a csh script. '>&' in csh redirects both standard output and standard error at the same time. The Bourne shell family of shells will not like this if they have to execute it. This could be your entire problem. The script should start with #!/bin/csh. The first chmod makes everything executable. This makes directories searchable, but the line does not discriminate. I've no idea what the php line does. It depends on the php script. And, it's executed before everything is made writable. The 755 makes files readable, writable and executable for the owner, but just read and execute for others. If you don't own the file, you won't be able to write to it. No idea what the "webmaster..." line is about.
suitti
Related Q & A:
- Can smbd help me to convert some values from real to virtual?Best solution by Stack Overflow
- Can you help us plan our trip to India?Best solution by Yahoo! Answers
- Can you help me learn how to copy and paste an html link to my website?Best solution by Yahoo! Answers
- I need help with some horse questions, can you help me.Best solution by Yahoo! Answers
- Hi.... can you help me? you can give me the address e-mail of robert pattinson?if you have him/it you send me?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.