473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

stat.st_mode deciphering

I have a question about the value of st_mode for files and directories.

Given this file and this directory:
drwxrwxr-x 2 chris chris 4096 Jun 17 23:14 foo
-rwxrwxr-x 1 chris chris 13803 Jun 19 09:07 st1

st_mode for the executable st1 is 100775.
st_mode for the directory foo is 40775.

So I get that the 775 is the permissioning, but I can't reckon what the rest
of it is (the 100 and the 40).

Any insight is greatly appreciated.

Nov 14 '05 #1
1 8417
Nuts. Sorry for the cross-post. This was intended for
comp.unix.programmer.... Where the hell is my breakfast?
"John" <ia******@hotmail.com> wrote in message
news:7r********************@comcast.com...
I have a question about the value of st_mode for files and directories.

Given this file and this directory:
drwxrwxr-x 2 chris chris 4096 Jun 17 23:14 foo
-rwxrwxr-x 1 chris chris 13803 Jun 19 09:07 st1

st_mode for the executable st1 is 100775.
st_mode for the directory foo is 40775.

So I get that the 775 is the permissioning, but I can't reckon what the
rest of it is (the 100 and the 40).

Any insight is greatly appreciated.

Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paulo Pinto | last post by:
I am doing an application that needs to know when it is manipulating symbolic links. But it is failing to reckognize them. If I run the following code: <code> import sys import os
3
by: Steven T. Hatton | last post by:
I found the following two statements in the file linked below: struct stat st; stat(fileName.c_str(), &st); http://websvn.kde.org/branches/work/kdevelop4-parser/main.cpp?rev=420247&view=markup...
10
by: David Farning | last post by:
I am new to c and not yet sure of the boundary between c and it's implementations. So please redirect me if this should be asked elsewhere. I am working on a function to determine if a directory...
2
by: electric sheep | last post by:
I'm not sure if this is POSIX or not ... and indeed if POSIX is OT here or not, but if the subject made sense to you .... I have a very simple program here, but it seems to be returning a "true"...
3
by: David Bear | last post by:
I'm trying to use os.chmod and am refered to the stat module. Is there are explanation of: * S_ISUID * S_ISGID * S_ENFMT * S_ISVTX * S_IREAD * S_IWRITE * S_IEXEC
24
by: Joe Salmeri | last post by:
I just upgraded from Python 2.4.2 to Python 2.5.1 and have found some unexpected behavior that appears to be a bug in the os.stat module. My OS is Windows XP SP2 + all updates. I have several...
2
by: Rolf =?UTF-8?B?S3LDvGdlcg==?= | last post by:
Hi I´m about learning C/C++ and after covering the language basics I´m now heading for my first "real" application where I need to use the POSIX stuff for directory operations. Here´s my...
3
by: Deniz Dogan | last post by:
Hello. I have a question regarding the st_mode field of the "stat" struct in sys/stat.h. I'd like to know how to use the S_IRWXU, S_IRWXG and S_IRWXO flags to mask the mode_t value into human...
6
by: onLINES | last post by:
I'm running into an issue. To my understanding, when lstat() returns -1 (FAILURE) it's because it hit a broken link? If that is not the case, then how can i retrieve information on either a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.