Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a link do this for me?

Status
Not open for further replies.

BobRaney

Programmer
Nov 22, 2001
59
US
Hello,

I have a directory that has a few files that I would like to let all users have access to, many others that I would not. The files that I would like them to see are being created and deleted every day. I cannot change the directory that these files are created in.

/prod/file1
/prod/file2
/prod/file3.txt
/prod/file4.123
/prod/file5.dat
/prod/file6.txt

I would like to have all users be able to see

/test/file3.txt
/test/file6.txt

Is there any way I can use a link to accomplish this?

Thanks,

Bob
 
A link can't change the underlying permissions of the file - if a user can't read a file, they won't be able to read the file via a symbolic link.

> many others that I would not.
Are you trying to hide the existence of the files, or just the contents of those files?

If you just want to allow access to the files, and don't mind people knowing the names of other files, then something like this.
Code:
chmod go-rwx *    # hide all files from everyone else
chmod go+r *.txt  # allow read access to all text files
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top