LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-15-2011, 09:34 PM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
How to change the file mode to -rws--s---


I have a file that the file mode is -rws--s--- , I want to create a file that is the same mode as it , I tried chmod +s , but I changed to -rwSr-Sr-- , can advise what can i do ?

Thanks.
 
Old 09-15-2011, 09:54 PM   #2
rootdev
LQ Newbie
 
Registered: May 2010
Posts: 1

Rep: Reputation: 0
Try chmod 6710 file
 
Old 09-15-2011, 10:28 PM   #3
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by rootdev View Post
Try chmod 6710 file
Thx ,

it works ,

if set to this mode , does it mean only root can run it ?
 
Old 09-16-2011, 12:07 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,005

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Root and whomever is in the group (second s) assigned to the file.

Also, should you need to find what to set a file to when you have an example file you can simply run stat on the example
and it will give you the numbers required.
 
Old 09-16-2011, 01:05 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually,
Code:
-rws--s---
means

1. owner can read/write/execute and it will be run as owner
2. group can execute and it will run as group: actually, it'll prob run as owner anyway. normally g=s is used for shared dirs, a different concept.
3. other (world) none

https://secure.wikimedia.org/wikipedia/en/wiki/Setuid
 
Old 09-16-2011, 02:11 AM   #6
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
can not show time when rcp

Thanks.
 
  


Reply



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
[SOLVED] Change From Graphic Mode To Text Mode in CentOS 5.3? k_oudom Linux - Server 1 09-14-2009 05:26 AM
Change from GUI mode to text mode alexr186 Linux - Software 4 01-08-2009 06:56 AM
Change the display mode in text mode Drunkalot Linux - General 7 08-12-2005 11:35 AM
How can I change display mode from character mode to graph mode wuzhong Linux - Hardware 1 08-08-2004 09:36 AM
Change file mode juno Linux - General 1 12-05-2002 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:56 PM.

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
Open Source Consulting | Domain Registration