Jump to content

chmod usage question


Vdubjunkie
 Share

Recommended Posts

Hello all,

I have seen many times people explaining chmod using letters such as u+x or something of that nature, and since numbers just make sense to me rather than learning more obscure letters and what they pertain to, I opted for numbers. However, when having to do a chmod u+s on my /usr/bin/smbmnt file to "install" it "suid root" I wondered what if any equivalent in numbers there would be. If there isn't I guess I may have to learn the letters. :angry: Man that will piss me off :twisted:

Link to comment
Share on other sites

I'll keep looking around to find something that explains that first of 4 number strings when doing a "number" chmod.

Sorry, didn't read your post properly. According to a Linux Journal article on the subject -

 

In octal mode, SUID and SGID are set by specifying them in another column before the user mode. For SUID use 4, for SGID use 2, and use 6 for both:

 

$ chmod 4755 test_file

-rwsr-xr-x 1 eric  users

 

Is this what you're looking for? :unsure:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...