0

I want to add suid. The folder has this permission drwxrwxrwx and I want to change it to srwxrwxrwx. Everything I have tried and read about replaces it at the end of the groups. How can I make it so it appears in the beginning of the user group?

deploy@dimsum:/tmp$ ls -l
total 752
srwxrwxrwx 1 deploy deploy      0 Dec 16 09:18 puma-status-1450232293388-7085
srwxrwxrwx 1 deploy deploy      0 Jan  8 16:58 puma-status-1452247111766-14349
dan-klasson
  • 127
  • 1
  • 8
  • 2
    This sounds very much like an XY problem. What do you actually want to do? – terdon Mar 30 '16 at 10:01
  • @terdon: Well the actual problem is not related to Unix. – dan-klasson Mar 30 '16 at 10:04
  • 2
    Um, then why are you asking here? What makes you think that srwxrwxrwx is what you need? That's not actually possible anyway, the first letter will always be a d for a directory. You can get drwsrwsrwx if you like, but what are you actually trying to do? – terdon Mar 30 '16 at 10:11
  • @terdon: Adding that folder gave me another error message, suggesting that it recognized the directory exists, but that it doesn't have permission to write to it. Adding my output – dan-klasson Mar 30 '16 at 10:13
  • 1
    Also explain where you "added" it and what complained. Your output shows sockets, not directories. And you don't need SUID to have access to anything. Please explain what you are trying to do and not the solution you are trying to apply. The solution could be (almost certainly is, based on what you say) wrong. We can't help unless you tell us what the final objective here is. – terdon Mar 30 '16 at 10:15
  • 1
    See also http://unix.stackexchange.com/questions/183994/understanding-unix-permissions-and-their-attributes/183999#183999 to understand why you can't change the first character. – Stephen Kitt Mar 30 '16 at 10:16
  • If you create a socket and assign it mode 777, then you will see srwxrwxrwx, please note that s as first character means "socket" and not "suid". – dave_alcarin Mar 30 '16 at 10:18
  • @dave_alcarin: Ah ok, that explains it then. And answers my question. Post it as an answer and I will accept. – dan-klasson Mar 30 '16 at 10:21
  • @dan-klasson I don't understand why you refuse to explain what your aim is. We might actually be able to help. – terdon Mar 30 '16 at 11:03
  • @terdon: It's specifically related to a Ruby app being deployed with Capistrano. And the error is specifically with Puma. – dan-klasson Mar 30 '16 at 11:05
  • @dan-klasson as you wish. Just note that making these sockets is probably not what you need to do and that, if you actually show the specific error message you are getting, we might be able to offer a solution. – terdon Mar 30 '16 at 11:08

1 Answers1

2

As stated in comments, this is an XY Problem, but:

  • Please note that the first letter s means "socket" and not "SUID"
  • If you create a socket and assign it the mode 777, you will see exactly srwxrwxrwx
  • Also mentioned in the comments, a very good post regarding information about the first letter, permissions, and attributes is to be found here

Note that this might not solve your original problem!