1

I need to change the permission on this directory from being a socket to a directory ...

From this permissions

srwxrwxrwx 1 root root 0 Jul 10 11:44 pipe

to

drwxr-x--- 2 root winbindd_priv 4096 Jul 10 11:44 /var/lib/samba/winbindd_privileged
1
  • It's not a matter of permissions. That the type of entity is shown along with permissions doesn't mean that it is part of them. – muru Oct 2 '15 at 18:52
0

The item you are listing is a socket, not a directory.

A socket is not a type of directory. It is something else entirely.

Consequently, you can't change the socket into a directory, any more than you can change a mouse into a keyboard.

However, if you just want to remove the socket, you should be able to do so by using rm pipe. Since the file (socket file) you show is owned by root, you need root privileges to do this. (On the other hand, since the file you show is owned by root, you probably shouldn't remove it unless you know exactly what you are doing and why. Otherwise things will get messy. Root privileges give you total power over your computer, including the power to destroy it if you don't know what you are doing.)

To create a directory with the name directory_name, just type mkdir directory_name.

And on a more general note, if you are running into a situation that you think would be solved by turning a socket into a directory, you probably went "off the rails" quite a while ago, and you should back up and see where things went wrong, and then post a question about that. ;)

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.