Results 1 to 7 of 7
hello
im reading Programming in Linux, i havent used Linux either as just a user and as developer im just trying to get into it . and here is something ...
- 04-14-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 3
new to Linux programming
hello
im reading Programming in Linux, i havent used Linux either as just a user and as developer im just trying to get into it . and here is something that made me think about , it is said that while developing applications in linux , we need to take into account the user rights thing. i mean for example during run time if the application needs to reach some restricted files, obviously if we didnt took it into account, access denied would happen . so how we resolve this , is there some system calls that we can write root user account info log into ,during run time, or what, give some clarifications plz !!
thanks for attention!! Hafiz
- 04-14-2010 #2
what exactly are you trying to accomplish?
you need a different mindset for this, because privilege is everything on linux and unix systems, and it is this way for a reason
you can always run an application as root, but most of the time this isn't necessary
- 04-14-2010 #3Debian GNU/Linux -- You know you want it.
- 04-14-2010 #4Just Joined!
- Join Date
- May 2006
- Location
- San Jose, CA
- Posts
- 67
Depends how restricted that file is. Most files tend to have "read" permission for non-privileged users (all the header files, libraries etc.) so applications can read them but not change them. Log files tend to not even have "read" permission for non-privilieged users for obvious reasons.

So you will only get "access denied" if you try to make changes to such files. If you are simply reading from them you will be fine.
- 04-15-2010 #5Just Joined!
- Join Date
- Apr 2010
- Location
- reserved memory
- Posts
- 3
If you are just writing your first desktop app or computer game, you won't have to worry about permissions much. The general rule of thumb: you can always read and write to files in the user's home directory, but you only read from files everywhere else on the system. (Except, of course, during program installation.)
If you decide to program something more advanced, like a system daemon or database server, permissions issues can become more complicated. But if you were knowledgeable enough to program one of those, I'm sure you wouldn't need to ask how Linux permissions work...
- 04-15-2010 #6Just Joined!
- Join Date
- Apr 2010
- Posts
- 3
thanks for your responses
)
what im trying to do is for now just to understand this process actually, im not programming yet. now i get something from your responses . but part of me still don't get it
) for example , as an user with some restrictions, i want to write some program that needs to access to sound card (for example) . how do i do that . i mean i need just general information, to understand the process
thank you !!
- 04-15-2010 #7Just Joined!
- Join Date
- Apr 2010
- Posts
- 3
GNU-fan ,that is really helpful link , thank you!!
ps: i cant quotes for now


Reply With Quote
