I need to able to hide a directory that is already created. More importantly when an ftp user logs in I want them to not be able to see a certian directory. It already has root permissions, any ideas?

Hello,

Inside of linux, you can make a hidden directory by placing a period in front of it, such as /home/testuser/.hiddendir The directory will not show up with a casual dir or ls command, but it will show up with a ls -al or ls -a command. It does nothing to prevent someone from getting into the directory either.

We also need some clarification concerning your FTP process. You can already restrict a FTP user to a certain directory tree, just by editing where they can go within the FTP server, and the /etc/passwd files which control the scope of the user. What are you specifically trying to do? What is your OS of choice?

Thanks,

Christian

If the user is not in the appropriate group, or if they're not the owner of the folder, they fall in the "Other" category. If you place a period in front, like Christian mentioned, you'll hide it. If you simply remove the read priviledge from the other group, that would do it. That way, they couldn't get a listing of the directory

For instance, if you wanted the group and the owner associated with read/write privs, but didn't want non-group members to read it, you could do chmod 660 foldername

Of course, if you really don't want people to access it, put it in a place they can't get to. If you've got an FTP root directory, put that folder in a directory that the unauthorized user has no access to.

also, most decent ftp daemons allow you to deny access to dot files, and directories.. so if its 'hidden' they can't get at it...

commented: Grea tfollowup post! +5
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.