Server for Information Technologies ������ ��������������
������� �������������� ����������
(095) 932-9212, 932-9213, 939-0783
E-mail: [email protected]
������ �������� ����(!) ������������� ���������� CIT Forum CD-ROM

CHOWN(2)

��������
chown - ��������� ��������� � ������ �����

���������

        int chown (path, owner, group)
        char *path;
        int owner, group;

��������
�������� path �������� ���������� �� ���������� ��� �����. �������������� ��������� � ������ ���������� ����� ��������������� ������� �������� ���������, ��������������, ���������� owner � group.

�������� ������ ����� (��������� � ������) ����� ������ �������, ������� ����������� ������������� ������������, ������ �������������� ��������� ����� ��� �����������������.

���� ��������� ����� chown ����������� �� ������������������, �� ���� ������������� ��������������� ������������ � ������, 04000 � 02000 ��������������, ����������.

��������� ����� chown ����������� �������� � �������������� ��������� � ������ ���������� ����� �� ����������, ���� ��������� ���� �� ���� �� ��������� �������:

[ENOTDIR]
��������� �������� �� �������� ���������.
[ENOENT]
��������� ���� �� ����������.
[EACCES]
��� ���������� �������� ����������� ����� �� �����.
[EPERM]
����������� ������������� ������������ �� ����� �������������� ��������� ����� ��� �����������������.
[EROFS]
��������� ���� ���������� � �������� �������, ��������� ������ �� ������.
[EFAULT]
�������� path ��������� �� ������� ����������� �������� ��������� ������������.
[EINTR]
�� ����� ���������� ���������� ������ ���������� ������.
[ENOLINK]
���������� ��� path ��������� �� ��������� ���������, ����� � ������� � ������ ������ ���.
[EMULTIHOP] ���������� path ������� ������������� ��������� � ��������� �����������.

��. �����
chmod(2).
chown(1) � ����������� ������������.

�����������
��� �������� ���������� ��������� ����� 0; � ������ ������ ������������ -1, � ���������� errno ������������� ��� ������.
Comments: [email protected]
Designed by Andrey Novikov
Copyright © CIT