LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-25-2016, 12:31 PM   #1
vinmansbrew
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Rep: Reputation: Disabled
4755 permissions requirement


Working on a program and their manual says it requires permissions on a particular file to be 4755. Contacting their support and they say the same thing.
So I chmod the file 4755 and it comes out in the octal format, -rwsr-xr-x, as expected.

Apparently, support doesn't know if it will work like this.

So, being the noob I am on Red Hat 6, is there a way to phrase chmod so the end result is 4rwxr-xr-x or whatever form they seem to think it should be?
I mean -rwsr-xr-x IS 4755, correct?
 
Old 02-25-2016, 12:37 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,667

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
Yes. 4xxx sets the setuid (s) bit.
 
Old 02-25-2016, 12:40 PM   #3
vinmansbrew
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
And that's what I have done. Currently, the file reads -rwsr-xr-x Is it possible to set that first - to a 4? I don't think so, but then I'm not close to being an expert.
 
Old 02-25-2016, 01:04 PM   #4
hydrurga
Senior Member
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 18.1 MATE
Posts: 1,904

Rep: Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614
Quote:
Originally Posted by vinmansbrew View Post
And that's what I have done. Currently, the file reads -rwsr-xr-x Is it possible to set that first - to a 4? I don't think so, but then I'm not close to being an expert.
The first - shows that the file is an ordinary file. Other options include:

https://en.wikipedia.org/wiki/Unix_file_types

The file type is stored (in ext 2/3/4 anyway) in a 8-bit structure, so I suppose if you really really wanted to, you could directly edit the filesystem raw data to change it to an ASCII '4' but the filesystem wouldn't recognise it - it currently only recognises 0x0 to 0x7, representing unknown and 7 file types.
 
Old 02-25-2016, 01:07 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,131

Rep: Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347
That first "-" is the file type: "-" for an ordinary file, "d" for a directory, "l" for a symbolic link, "c" for a character device, "b" for a block device, etc.

"rwsr-xr-x" is the representation for octal mode 4755.
 
Old 02-25-2016, 02:04 PM   #6
vinmansbrew
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
That first "-" is the file type: "-" for an ordinary file, "d" for a directory, "l" for a symbolic link, "c" for a character device, "b" for a block device, etc.

"rwsr-xr-x" is the representation for octal mode 4755.
OK, that is what I thought. Thanks, everyone.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
run set-uid shell program in ubuntu and set premission 4755 goldengriff Ubuntu 12 11-20-2013 03:51 AM
harfbuzz requirement dwblas Slackware 3 05-21-2013 08:49 PM
fedora requirement shadowsurfer Linux - Newbie 1 09-09-2004 08:48 PM
ADSL requirement Ricio General 5 08-11-2004 05:33 PM
what is the requirement tony2666 Fedora - Installation 1 05-20-2004 03:58 PM


All times are GMT -5. The time now is 06:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration