Chmod Command has Problems with Space in Folder-Names

To the Ipswitch web site

Ipswitch Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Chmod Command has Problems with Space in Folder-NamesExpand / Collapse
Author
Message
Posted 9/6/2004 6:21:35 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/6/2004 9:26:00 AM
Posts: 1, Visits: 1
The chmod-command is very useful, really !

The function to chmod more files ans folders is very useful too !

But the command doesn't understand spaces in foldernames !

eq

site chmod 777 /html/Bilder/Party & Fun/ski fahren

is'nt unterstood (thats the command ws_FTP Pro uses)

site chmod 777 "/html/Bilder/Party & Fun/ski fahren"

is unterstood !

Is there anyway to work arouns this, but typing everything ?

Thank you !

BLACK
Post #1180
Posted 9/7/2004 9:19:42 AM


Time Traveler

Time TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime TravelerTime Traveler

Group: Moderators
Last Login: 7/16/2008 8:55:05 AM
Posts: 176, Visits: 9
It works just like an FTP command prompt. A chmod command looks for two arguments: a permission setting and a file/folder name. But the arguments are delimited by the space character (" ") before it's passed to the chmod command. Therefore 'site chmod 777 /html/Bilder/Party & Fun/ski fahren' passes the following arguments to chmod:

1: 777
2: /html/Bilger/Party
3: &
4: Fun/ski
5: fahren

This definitely isn't what chmod is looking for, though. Quoting is how we tell the chmod command that we only have two arguments, so that 'site chmod 777 "/html/Bilder/Party & Fun/ski fahren"' passes the following arguments to chmod:

1: 777
2: /html/Bilder/Party & Fun/ski fahren

This is the way it works in command-line FTP, DOS, and UNIX. The behavior you have noticed is exactly the way it is supposed to work.





Brandon Felger
IMail Install Developer
Ipswitch
Post #1183
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Dave, Mark Singh, kevin r gillis, Jason Benton, Brandon Felger, Ben Henderson, Tripp Allen, Will Sansbury, Jason Williams, Hush, FTPplanet.com, LDW, Hugh Garber, WUP-PM, mmulryan@ipswitch.com, mswimm, Travis G.

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 9:06pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.094. 8 queries. Compression Enabled.