Device file permissions on mac os x

I m wanted to read hard disk but unable to read. I m able to read any .txt and .doc file on mac os x.

I have two hard disks attached with my system
/dev/disk0
#: type name size identifier
0: FDisk_partition_scheme *18.6 GB disk0
1: DOS_FAT_32 NO NAME 9.8 GB disk0s1
/dev/disk1
#: type name size identifier
0: Apple_partition_scheme *55.9 GB disk1
1: Apple_partition_map 31.5 KB disk1s1
2: Apple_Driver43 28.0 KB disk1s2
3: Apple_Driver43 28.0 KB disk1s3
4: Apple_Driver_ATA 28.0 KB disk1s4
5: Apple_Driver_ATA 28.0 KB disk1s5
6: Apple_FWDriver 256.0 KB disk1s6
7: Apple_Driver_IOKit 256.0 KB disk1s7
8: Apple_Patches 256.0 KB disk1s8
9: Apple_HFS Macintosh HD 55.9 GB disk1s9

and the file permissions of these device files are
brw-r----- 1 root operator 14, 0 28 Oct 11:41 /dev/disk0
brw-r----- 1 root operator 14, 1 28 Oct 11:41 /dev/disk1

I have tried to change the permissions through root but message is
chmod o+r /dev/disk0
chmod: /dev/disk0: Operation not permitted

How i can change the file permissions.
plz tell how i have to proceed and give solution to the problem described.
thanx
manojchauhanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

brettmjohnsonCommented:
You already asked this question using a slightly different membername (forbidden on EE, BTW).
http://oldlook.experts-exchange.com:8080/Programming/Programming_Platforms/Mac_Prog/Q_21184532.html
0
manojchauhanAuthor Commented:
hi sir
   Plz give reply to my question.
   I am using my friends id to solve my problem, he has two ids of expert exchange
thanx
0
bachra04Commented:
Hi,

First of All, you can never change the permission of device file (even with root permission).
This said, if you want to open a device file from your application you can use the following commands:
Open , read, write and close.

according to apple:
"If you know the name of a device file (for example, disk0s2 or mt0) your application can use POSIX functions such as open, read, write, and close to access and control the associated device."

See this link for more details:
 
http://developer.apple.com/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/ArchitectOverview/chapter_3_section_7.html

-BT
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

manojchauhanAuthor Commented:
dear sir
        thanks a lot for giving such a valuable comment. But i  have  changed the device file permissions login through super user. and after giving all rights to the /dev/rdisk0 i m now able to read the hard disk.
      Again thanx a lots for sparing such a valuable time for my question.
with regards
0
bachra04Commented:
Hi again,

I'm new to unix but for this question I asked one of my colleagues who is supposed to be an expert in UNIX and he ensured me that it is impossible to change device file permission.
Anyway, I learned something new.
Thank you for this information.

-BT
0
GhostModCommented:
PAQd, 125 points refunded.

GhostMod
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.