Home > Archive > microsoft.public.cert.exams.mcse > August 2002 > FTP woes





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author FTP woes
_Mike_

2002-08-13, 8:23 pm

I needed to allow some one to FTP some files to me and in my haste,
gave everyone write access. Some one loaded a whole lot of crap
with a long string of directories changing permissions. I managed
to take ownership of the files and delete them but I cannot get rid
of the directories.

http://support.microsoft.com/defaul...b;en-us;q120716
explains how to delete such directories using the RM unix
command that comes with the resource kit. However it does not
work. I get a string of unknown error / permission denied

D:\Inetpub\ftproot>posix /c rm.exe -r "//D/Inetpub/ftproot"
rm: //D/Inetpub/ftproot/RM.EXE: Unknown error.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / ..potroh /#...fordivxclub : Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / ..potroh :Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / : Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 : Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 : Permission denied.
rm: //D/Inetpub/ftproot/ : File exists.
rm: //D/Inetpub/ftproot: Permission denied.
D:\Inetpub\ftproot>

The documentation with the resource kit says the RM command is
for files only, and RMDIR is for directories, so I tried this

D:\Inetpub>posix /c rmdir.exe "//D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh / #...fordivxclub "
//D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh / #...fordivxclub : Permission denied
rmdir:
D:\Inetpub>

However, I cannot find any means of changing the permission on these
directories, right clicking on them gives this



The advanced option is for setting if it is indexed or not.
Any ideas how I can delete these directories or set permissions
on them?

--

Cheers
Mike
Jim

2002-08-13, 9:23 pm

What if you click on the drive and take ownership of the entire drive?


"_Mike_" <no_@spam.com> wrote in message
news:#eKtaYzQCHA.2388@tkmsftngp10...
I needed to allow some one to FTP some files to me and in my haste,
gave everyone write access. Some one loaded a whole lot of crap
with a long string of directories changing permissions. I managed
to take ownership of the files and delete them but I cannot get rid
of the directories.

http://support.microsoft.com/defaul...b;en-us;q120716
explains how to delete such directories using the RM unix
command that comes with the resource kit. However it does not
work. I get a string of unknown error / permission denied

D:\Inetpub\ftproot>posix /c rm.exe -r "//D/Inetpub/ftproot"
rm: //D/Inetpub/ftproot/RM.EXE: Unknown error.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh
/#...fordivxclub : Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh
:Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / : Permission
denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 : Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 : Permission denied.
rm: //D/Inetpub/ftproot/ : File exists.
rm: //D/Inetpub/ftproot: Permission denied.
D:\Inetpub\ftproot>

The documentation with the resource kit says the RM command is
for files only, and RMDIR is for directories, so I tried this

D:\Inetpub>posix /c rmdir.exe "//D/Inetpub/ftproot/ / .com4 /
..com1 / / .potroh / #...fordivxclub "
//D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh
/ #...fordivxclub : Permission denied
rmdir:
D:\Inetpub>

However, I cannot find any means of changing the permission on these
directories, right clicking on them gives this



The advanced option is for setting if it is indexed or not.
Any ideas how I can delete these directories or set permissions
on them?

--

Cheers
Mike


Jim

2002-08-13, 9:23 pm

Have you tried it from the root, as apposed to being in the directory that
you are trying to delete?

Jim

"_Mike_" <no_@spam.com> wrote in message
news:#eKtaYzQCHA.2388@tkmsftngp10...
I needed to allow some one to FTP some files to me and in my haste,
gave everyone write access. Some one loaded a whole lot of crap
with a long string of directories changing permissions. I managed
to take ownership of the files and delete them but I cannot get rid
of the directories.

http://support.microsoft.com/defaul...b;en-us;q120716
explains how to delete such directories using the RM unix
command that comes with the resource kit. However it does not
work. I get a string of unknown error / permission denied

D:\Inetpub\ftproot>posix /c rm.exe -r "//D/Inetpub/ftproot"
rm: //D/Inetpub/ftproot/RM.EXE: Unknown error.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh
/#...fordivxclub : Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh
:Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / : Permission
denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 : Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 : Permission denied.
rm: //D/Inetpub/ftproot/ : File exists.
rm: //D/Inetpub/ftproot: Permission denied.
D:\Inetpub\ftproot>

The documentation with the resource kit says the RM command is
for files only, and RMDIR is for directories, so I tried this

D:\Inetpub>posix /c rmdir.exe "//D/Inetpub/ftproot/ / .com4 /
..com1 / / .potroh / #...fordivxclub "
//D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh
/ #...fordivxclub : Permission denied
rmdir:
D:\Inetpub>

However, I cannot find any means of changing the permission on these
directories, right clicking on them gives this



The advanced option is for setting if it is indexed or not.
Any ideas how I can delete these directories or set permissions
on them?

--

Cheers
Mike


_Mike_

2002-08-13, 9:23 pm


"Jim" <junk@junk.com> wrote in message news:u4s2QvzQCHA.2268@tkmsftngp10...
> Have you tried it from the root, as apposed to being in the directory that
> you are trying to delete?


Yes, excuse the screenshots, but it says a thousand words, and yes,
I am logged in locally as enterprise admin as well

I get an access denied error on files and a 'cannot find the file specified' error
for directories with invalid / reserved names





Cheers
Mike
BB

2002-08-13, 11:23 pm

Whatever

2002-08-14, 1:23 am

circa Wed, 14 Aug 2002 02:57:45 +0100, in
microsoft.public.cert.exam.mcse, _Mike_ (no_@spam.com) said,
> I needed to allow some one to FTP some files to me and in my haste,
> gave everyone write access. Some one loaded a whole lot of crap
> with a long string of directories changing permissions. I managed
> to take ownership of the files and delete them but I cannot get rid
> of the directories.
>

http://support.microsoft.com/defaul...;EN-US;Q320081&

Cause 4: The File Name Includes a Reserved Name in the Win32 Name
Space
If the file name includes a reserved name (for example, "lpt1") in
the Win32 name space, you may not be able to delete the file. To
resolve this issue, use a non-Win32 program to rename the file. You
can use a POSIX tool or any other tool that uses the appropriate
internal syntax to use the file.

Additionally, you may be able to use some built-in commands to bypass
the typical Win32 reserved name checks if you use a particular syntax
to specify the path to the file. For example, if you use the del
command in Windows XP, you can delete a file named "lpt1" if you
specify the full path to the file by using the following special
syntax:
del \\?\c:\ path_to_file\lpt1
For additional information about deleting files with reserved names
under Windows NT and Windows 2000, click the article number below to
view the article in the Microsoft Knowledge Base:
Q120716 How to Remove Files with Reserved Names in Windows
For additional information about deleting files with reserved names
under Windows XP, click the article number below to view the article
in the Microsoft Knowledge Base:
Q315226 How to Remove Files with Reserved Names in Windows XP
If you open a handle to a file by using the typical Win32 CreateFile
mechanism, certain file names are reserved for old-style DOS devices.
For backward compatibility, these file names are not allowed and they
cannot be created by using typical Win32 file calls. However, this
issue is not a limitation of NTFS.

You may be able to use a Win32 program to bypass the typical name
checks that are performed when a file is created (or deleted) by
using the same technique that you use to traverse folders that are
deeper than MAX_PATH. Additionally, some POSIX tools are not subject
to these name checks.
Cause 5: The File Name Includes an Invalid Name in the Win32 Name
Space
You may not be able to delete a file if the file name includes an
invalid name (for example, the file name has a trailing space or a
trailing period or the file name consists of a space only). To
resolve this issue, use a tool that uses the appropriate internal
syntax to delete the file. You can use the "\\?\" syntax with some
tools to operate on these files, for example:
del "\\?\c:\ path_to_file_that contains a trailing space.txt "
The cause of this issue is similar to Cause 4. However, if you use
typical Win32 syntax to open a file that has trailing spaces or
trailing periods in its name, the trailing spaces or periods are
stripped before the actual file is opened. Therefore, if you have two
files in the same folder named "AFile.txt" and "AFile.txt " (note the
space after the file name), if you try to open the second file by
using standard Win32 calls, you open the first file instead.
Similarly, if you have a file whose name is just " " (a space
character) and you try to open it by using standard Win32 calls, you
open the file's parent folder instead. In this situation, if you try
to change security settings on these files, you either may not be
able to do so or you may unexpectedly change the settings on
different files. If this behavior occurs, you may think that you have
permission to a file that actually has a restrictive ACL.
diamondÐan

2002-08-14, 8:23 am

In article <#eKtaYzQCHA.2388@tkmsftngp10>, _Mike_ decided to open his
mouth and remove all doubt by saying...

> I needed to allow some one to FTP some files to me and in my haste,
> gave everyone write access. Some one loaded a whole lot of crap
> with a long string of directories changing permissions. I managed
> to take ownership of the files and delete them but I cannot get rid
> of the directories.
>
> http://support.microsoft.com/defaul...b;en-us;q120716
> explains how to delete such directories using the RM unix
> command that comes with the resource kit. However it does not
> work. I get a string of unknown error / permission denied
>
> D:\Inetpub\ftproot>posix /c rm.exe -r "//D/Inetpub/ftproot"
> rm: //D/Inetpub/ftproot/RM.EXE: Unknown error.
> rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh /#...fordivxclub : Permission denied.
> rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh :Permission denied.
> rm: //D/Inetpub/ftproot/ / .com4 / .com1 / : Permission denied.
> rm: //D/Inetpub/ftproot/ / .com4 / .com1 : Permission denied.
> rm: //D/Inetpub/ftproot/ / .com4 : Permission denied.
> rm: //D/Inetpub/ftproot/ : File exists.
> rm: //D/Inetpub/ftproot: Permission denied.
> D:\Inetpub\ftproot>
>
> The documentation with the resource kit says the RM command is
> for files only, and RMDIR is for directories, so I tried this
>
> D:\Inetpub>posix /c rmdir.exe "//D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh / #...fordivxclub "
> //D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh / #...fordivxclub : Permission denied
> rmdir:
> D:\Inetpub>
>
> However, I cannot find any means of changing the permission on these
> directories, right clicking on them gives this
>
>
>
> The advanced option is for setting if it is indexed or not.
> Any ideas how I can delete these directories or set permissions
> on them?
>
>


I haven't played with posix in windows, but I do use unix daily.
Try rm -Rf. In unix this is an unconditional complete removal of the
entire tree, no questions asked (works on directories and files).

You could also try deltree (which I think comes with the res kit). Same
principle here, deletes the entire tree.

Also, have you tried applying permissions to the Inetpub directory and
then selecting the option to propagate those settings to all sub
directories in the tree?

BTW - I think I know who did this to your ftp server (well, not
specifically, but in general). When I was in college, there were some
guys that were members of an online movie pirating ring. They would get
a hold of bootlegs of new movies (before the release to video) and then
find unprotected FTP servers to host their files (since movies even in
divx format get quite large). They would use these FTP servers until the
admin (like yourself) discovered the files and made appropriate changes.
Rumor has it that there are a lot of unprotected FTP servers in the Las
Vegas area, these guys had some pretty stable file servers out of that
region. I never got close enough to be entrusted with passwords and IP
addresses, but I did get a general idea of how they operated.

Moral of the story: make sure you are secure and do not accept the
default installs provided by windows, it is a hack fest!
--
diamondDan - MCNGP #9 #9 #9 #9 #9 #9
http://www.mcngp.tk
The MCNGP Team - We're here to help
_Mike_

2002-08-14, 3:23 pm


"diamondÐan" <diamondÐan@mcngp.tk> wrote in message

> I haven't played with posix in windows, but I do use unix daily.
> Try rm -Rf. In unix this is an unconditional complete removal of the
> entire tree, no questions asked (works on directories and files).


Just get the usual access denied

> You could also try deltree (which I think comes with the res kit). Same
> principle here, deletes the entire tree.


Cannot find this

> Also, have you tried applying permissions to the Inetpub directory and
> then selecting the option to propagate those settings to all sub
> directories in the tree?


Yep, access denied as it runs through the permissions


Am I correct that CHMOD changes permissions on files?
Do you know the syntax for this?

Cheers
Mike


diamondÐan

2002-08-14, 4:23 pm

In article <#bp$JN9QCHA.2632@tkmsftngp10>, _Mike_ decided to open his
mouth and remove all doubt by saying...


> > Also, have you tried applying permissions to the Inetpub directory and
> > then selecting the option to propagate those settings to all sub
> > directories in the tree?

>
> Yep, access denied as it runs through the permissions
>
>
> Am I correct that CHMOD changes permissions on files?
> Do you know the syntax for this?
>


Kinda, that was going to be my next suggestion. If you are logged in as
root (again, talking from a UNIX background. the windows equivalent is
administrator) you can CHOWN the file permissions.

See http://www.rt.com/man/chown.1.html for complete syntax.


--
diamondDan - MCNGP #9 #9 #9 #9 #9 #9
http://www.mcngp.tk
The MCNGP Team - We're here to help
Whatever

2002-08-14, 4:23 pm

circa Wed, 14 Aug 2002 21:44:50 +0100, in
microsoft.public.cert.exam.mcse, _Mike_ (no_@spam.com) said,
> Am I correct that CHMOD changes permissions on files?
> Do you know the syntax for this?
>

Did you try this (from previous post; read for syntax)?

del \\?\c:\ path_to_file\lpt1

It works.
_Mike_

2002-08-14, 4:23 pm


"diamondÐan" <diamondÐan@mcngp.tk> wrote in message

> Kinda, that was going to be my next suggestion. If you are logged in as
> root (again, talking from a UNIX background. the windows equivalent is
> administrator) you can CHOWN the file permissions.
>
> See http://www.rt.com/man/chown.1.html for complete syntax.


Unfortunately POSIX does not have emulation for CHOWN, just
CHMOD

Basically what has happened is this directory structure has set up
a DENY permission to the group everyone for the following
Delete Subfolders and files
Delete
Change permissions
Take Ownership

So much for MS allowing administrator to always take ownership
of any files and directories



_Mike_

2002-08-14, 5:23 pm


"Whatever" <no@thank.you> wrote in message
news:MPG.17c49b28b890187f98a08c@msnews.microsoft.com...

> > Am I correct that CHMOD changes permissions on files?
> > Do you know the syntax for this?
> >

> Did you try this (from previous post; read for syntax)?
>
> del \\?\c:\ path_to_file\lpt1
>
> It works.


If it was a file I was trying to delete, maybe, but the del
command does not delete directories

Cheers
Mike

PS must I attach a screen capture of this before people believe me? :-)



BB

2002-08-14, 8:23 pm

What happen if you force a scan disk / chkdsk /f ?
will the OS try to 'do something'........

Well, so far you are the only case that I've seen that REALLY can't delete
those '@#$@#$' files and folders.

I really like to know how to get this solve. btw.. do you have any free PSS
token.
If you do, you might use it to get MS help.

Rgds.

"_Mike_" <no_@spam.com> wrote in message
news:Oxiz5C#QCHA.4248@tkmsftngp08...
>
> "Whatever" <no@thank.you> wrote in message
> news:MPG.17c49b28b890187f98a08c@msnews.microsoft.com...
>
> > > Am I correct that CHMOD changes permissions on files?
> > > Do you know the syntax for this?
> > >

> > Did you try this (from previous post; read for syntax)?
> >
> > del \\?\c:\ path_to_file\lpt1
> >
> > It works.

>
> If it was a file I was trying to delete, maybe, but the del
> command does not delete directories
>
> Cheers
> Mike
>
> PS must I attach a screen capture of this before people believe me? :-)
>
>
>


Jim

2002-08-14, 9:23 pm

Can you do anything if you connect remotely via FTP?

Jim


"_Mike_" <no_@spam.com> wrote in message
news:#eKtaYzQCHA.2388@tkmsftngp10...
I needed to allow some one to FTP some files to me and in my haste,
gave everyone write access. Some one loaded a whole lot of crap
with a long string of directories changing permissions. I managed
to take ownership of the files and delete them but I cannot get rid
of the directories.

http://support.microsoft.com/defaul...b;en-us;q120716
explains how to delete such directories using the RM unix
command that comes with the resource kit. However it does not
work. I get a string of unknown error / permission denied

D:\Inetpub\ftproot>posix /c rm.exe -r "//D/Inetpub/ftproot"
rm: //D/Inetpub/ftproot/RM.EXE: Unknown error.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh
/#...fordivxclub : Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh
:Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 / : Permission
denied.
rm: //D/Inetpub/ftproot/ / .com4 / .com1 : Permission denied.
rm: //D/Inetpub/ftproot/ / .com4 : Permission denied.
rm: //D/Inetpub/ftproot/ : File exists.
rm: //D/Inetpub/ftproot: Permission denied.
D:\Inetpub\ftproot>

The documentation with the resource kit says the RM command is
for files only, and RMDIR is for directories, so I tried this

D:\Inetpub>posix /c rmdir.exe "//D/Inetpub/ftproot/ / .com4 /
..com1 / / .potroh / #...fordivxclub "
//D/Inetpub/ftproot/ / .com4 / .com1 / / .potroh
/ #...fordivxclub : Permission denied
rmdir:
D:\Inetpub>

However, I cannot find any means of changing the permission on these
directories, right clicking on them gives this



The advanced option is for setting if it is indexed or not.
Any ideas how I can delete these directories or set permissions
on them?

--

Cheers
Mike


diamondÐan

2002-08-15, 7:23 am

In article <#nky449QCHA.2520@tkmsftngp10>, _Mike_ decided to open his
mouth and remove all doubt by saying...

>
> "diamondÐan" <diamondÐan@mcngp.tk> wrote in message
>
> > Kinda, that was going to be my next suggestion. If you are logged in as
> > root (again, talking from a UNIX background. the windows equivalent is
> > administrator) you can CHOWN the file permissions.
> >
> > See http://www.rt.com/man/chown.1.html for complete syntax.

>
> Unfortunately POSIX does not have emulation for CHOWN, just
> CHMOD
>
> Basically what has happened is this directory structure has set up
> a DENY permission to the group everyone for the following
> Delete Subfolders and files
> Delete
> Change permissions
> Take Ownership
>
> So much for MS allowing administrator to always take ownership
> of any files and directories
>
>

Move your data and reformat the partition.
(And make sure you are secure next time. ;-) )

--
diamondDan - MCNGP #9 #9 #9 #9 #9 #9
http://www.mcngp.tk
The MCNGP Team - We're here to help
70-228

2002-08-15, 10:23 am

"diamondÐan" <diamondÐan@mcngp.tk> wrote in message
> Move your data and reformat the partition.
> (And make sure you are secure next time. ;-) )


Hmmm no one has found an irrational way to blame Bootcamps for Mike's
struggle with this so far!!!

Hey Mike didn't you learn about this at Bootcamp?!?

LOL. There we go. Senseless goofy flame of bootcamps in totally unrelated
thread complete.

Carry on now. Nothing to see here... :-)


_Mike_

2002-08-15, 12:23 pm


"diamondÐan" <diamondÐan@mcngp.tk> wrote in message
news:MPG.17c5665b93b216f19897bf@news.microsoft.com...

> > Unfortunately POSIX does not have emulation for CHOWN, just
> > CHMOD
> >
> > Basically what has happened is this directory structure has set up
> > a DENY permission to the group everyone for the following
> > Delete Subfolders and files
> > Delete
> > Change permissions
> > Take Ownership
> >
> > So much for MS allowing administrator to always take ownership
> > of any files and directories


> Move your data and reformat the partition.
> (And make sure you are secure next time. ;-) )


It's a DC with all the AD stuff on the same volume, I am just going to
leave it be :-)

Cheers
Mike


Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net