Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google site



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-20-2005
Registered User
 

Join Date: Feb 2005
Posts: 10
Question chmod (permissions) * not working on remote server

Hi gurus !

I am developing a FTP script which will copy all the files from one server to another server and then I need to use CHMOD 755 * to set permissions of all the files just copied to the remote server.

mput *
chmod 755 *

CHMOD gives me an error [ *: No such file or directory ]

CHMOD works fine If I specify the full file name instead, any help????

Thanks
Sponsored Links
  #2 (permalink)  
Old 04-20-2005
Kelam_Magnus's Avatar
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
I would be sure to use the /path/to/data/* or at least part of the file name.

I never liked using * for chmod or chown, b/c you can really screw up a system. I had seen one box where chmod 444 * was done on the /etc directory. *shudders* I had to spend most of a day straightening it out.
  #3 (permalink)  
Old 05-05-2005
Registered User
 

Join Date: Mar 2005
Posts: 48
Well it depends on the system that you are connected to:

if you are connected to mainframe and you want to do chmod --> it will say not valid

and even if u are connected to Unix server they can block users typing anything in the ftp shell.
  #4 (permalink)  
Old 05-06-2005
Registered User
 

Join Date: Apr 2005
Location: McKinney, TX
Posts: 11
<<<DISCLAIMER>>>
i do not recommend doing this unless you know for SURE that the only files in the current remote directory are the files you just put there. you don't want to arbitrarily change permissions on other files
<<<DISCLAIMER>>>

the syntax you want to use in order to chmod 755 all the files in the current remote directory is this:
Code:
site chmod 755 *

if there ARE other files in the directory, then i suggest you re-write the script so that it puts one file at a time and then you can site chmod 755 one file at a time
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
changing permissions on a 444 file (ie chmod 444) ajcannon UNIX for Dummies Questions & Answers 1 08-31-2007 11:48 AM
Unix chmod permissions whiterabbit UNIX for Dummies Questions & Answers 2 04-25-2006 07:02 PM
ls and chmod numeric permissions rondebbs UNIX for Dummies Questions & Answers 1 12-29-2005 12:57 AM
chmod permissions himurak UNIX for Dummies Questions & Answers 1 11-30-2004 10:13 PM
directory permissions and CHMOD ncarmstrong UNIX for Dummies Questions & Answers 3 08-14-2002 02:00 PM



All times are GMT -4. The time now is 06:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0