[Info-vax] How to delete directory someone created in my directory
Fred Bach
bach at triumf.ca
Fri Mar 13 17:09:53 EDT 2009
JF Mezei wrote:
> Christopher Lusardi wrote:
>> (1) Some one created a directory in my directory and I can not delete
>> it. I also cannot change the protections of the directory. How do I
>> delete it.
>
>
> Ok, there are 3 issues here.
>
> A properly created directory will be created with you as owner, but you
> still cannot delete it by default.
>
> A properly created directory may be yours, but you won't be allowed to
> delete it if there are files inside.
>
> An improperly created directory may belong to someone else, in which
> case, you'll probably need the system manager to fix it.
>
> 1- Check onwership:
>
> DIR/SECURITY mysubdir.dir
>
> This will show if the directory file belongs to you or not. (normally
> should).
>
>
> 2- Change protection of directory:
>
> SET FILE mysubdir.dir/prot=(o:rwed)
> (this lets you read/write/execute/delete the file)
SET FILE /PROTECTION and SET PROTECTION might still work, but they
have been superseded.
$ help set file /protection
SET
FILE
PROTECTION
/PROTECTION[=(ownership[:access][,...])]
This command has been superseded by the SET SECURITY/PROTECTION
command.
>
> Emptying the directory is less user friendly:
>
> SET FILE [.mysubdir...]*.dir/prot=(o:rwed)/log
> this sets any subdirectories below to be deletable.
>
> DELETE [.mysubdir...]*.*;* /log
>
> This may generate errors if it tries to delete non-empty subdirectories.
> You re-issue the above commands until all file and all subdirectories
> have been deleted.
>
> DIR [.mysubdir] should now yield an empty directory.
>
> You shoud now be able to
>
> DELE/LOG mysubdir.dir;*
>
BACKUP any files in those directories that you want to keep. Then delete
all the files you can in those directories - there may be other files
you don't own and therefore can't delete without additional help.
Find out who owns the directory to be deleted ( use DIR/OWNER )
Get that person to sign on and empty the directory in question
by deleting the remainder of the files that you could not delete,
and then have that person SET SECURITY/PROTECTION=O:RWED on the
directory in question, and then have that person DELETE it.
If desired, re-create that directory yourself, and load the files
you want back into it from the backup you did earlier.
See Help Backup /BY_OWNER to learn about setting the owner of
the restored files.
The system manager can set his/her priv's to do all this too, if you
are unable to contact the person who created the directory.
.. fred bach ..
More information about the Info-vax
mailing list