Sponsored Content
Full Discussion: chown: Read-only file system
Top Forums UNIX for Dummies Questions & Answers chown: Read-only file system Post 302643805 by shoefiend on Sunday 20th of May 2012 05:16:34 PM
Old 05-20-2012
chown: Read-only file system

Hi,
I am logged in as super use and want to set owner of a root folder to a specific user.
Code:
#chown -R user1:group1 /u01

This gives the message:
Code:
chown: /u01: Read-only file system
chown: lost+found: Read-only file system

Code:
#ls -l
drwxr-xr-x    3 root     system          256 Mar 21 16:42 u01

chmod 777 does not work either:
Code:
# chmod 777 /u01
chmod: /u01: Read-only file system

How can I rectify this?

Last edited by Franklin52; 05-21-2012 at 05:44 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read through a file and Pass system commands

Hi, I have a file xyz.txt, which contains several "tar.gz" package names Eg :- Now i need to execute an rpm - ivh against all those packages in this file through a script one by one. I need a script to read through the file "xyz.txt", pick up each package name and execute rpm -ivh... (7 Replies)
Discussion started by: systemali
7 Replies

2. UNIX for Dummies Questions & Answers

read only file system

Hi, Has any one worked on IPSO operating system. I have a to add a file to /etc directory. When I create a file it comes up with read only file system. Is there any way of adding a file to this directory, without changing the etc directory parameters. Br, Eugene (1 Reply)
Discussion started by: eugene777
1 Replies

3. UNIX for Dummies Questions & Answers

/ file system mounts as read only

I have a Netra T1 server running Solaris 8, It was installed by jump start, it does not have a cdrom drive. Recetly it crashed so I rebooted it from >LOM poweron and it came to run level 3, all file systems listed in /etc/vfstab are mounted, but /dev and / root are not writeable though in... (3 Replies)
Discussion started by: Tirmazi
3 Replies

4. SCO

file system not getting mounted in read write mode after system power failure

After System power get failed File system is not getting mounted in read- write mode (1 Reply)
Discussion started by: gtkpmbpl
1 Replies

5. SCO

Read and write into file system from SCO

hi Knows someone what kind of file system uses SCO Unix 5.0.6? Which linux or unix LIVE CD can read and write into file system from SCO Unix? I've tried to boot SCO using Knoppix 6.2.1 LIVE CD, but cannot mount. # mount -t sysv /dev/sda1 /mnt mount: wrong fs type, bad option, bad superblock... (2 Replies)
Discussion started by: ccc
2 Replies

6. Infrastructure Monitoring

Nagios: How to read the Linux system file?

hi 2 all i installed nagios in my linux srvr . check_ftp file is in format of system format . i wants to see the syntax for that script how can i read that file .. ??? please help me ! (4 Replies)
Discussion started by: ponmuthu
4 Replies

7. OS X (Apple)

Read-only file system error

My first post :) I deleted all the files within /system/library/startupitems to the trash bin. Now my mac snow leopard won't boot at all. All I got is the gray screen, apple logo and the spinning wheel...just spinning forever. I was able to boot in single-user mode. I'm trying to copy cp command... (14 Replies)
Discussion started by: haxum
14 Replies

8. Red Hat

Read only file system : File show as ? ? ? ?

I have a test system, user which I have my home directory. /home/hansini The files under this directory show as ?--------- ? ? ? ? ? sam.sh ?--------- ? ? ? ? ? DDD I know on the test system OS is corrupt and it is read only file system. If I go to some other... (2 Replies)
Discussion started by: hansini
2 Replies

9. UNIX for Dummies Questions & Answers

rm: cannot remove file: Read-only file system

I have a file on a usb stick which I cannot remove and the following error message shows: rm: cannot remove `file-name': Read-only file system The usb stick is mounted as read-only on an Ubuntu system: $ mount /dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw) none... (4 Replies)
Discussion started by: figaro
4 Replies

10. Solaris

Getting read only propmt when opening /etc/system file

root@atrcx146:/# vi /etc/system "/var/tmp/Exv9a4Rb" Read-only file system Please let me know the reason (1 Reply)
Discussion started by: Marty11
1 Replies
CHOWN(2)						      BSD System Calls Manual							  CHOWN(2)

NAME
chown, fchown, lchown -- change owner and group of a file SYNOPSIS
#include <unistd.h> int chown(const char *path, uid_t owner, gid_t group); int fchown(int fildes, uid_t owner, gid_t group); int lchown(const char *path, uid_t owner, gid_t group); DESCRIPTION
The owner ID and group ID of the file named by path or referenced by fildes is changed as specified by the arguments owner and group. The owner of a file may change the group to a group of which he or she is a member, but the change owner capability is restricted to the super- user. The chown() system call clears the set-user-id and set-group-id bits on the file to prevent accidental or mischievous creation of set-user-id and set-group-id programs if not executed by the super-user. The chown() system call follows symbolic links to operate on the target of the link rather than the link itself. The fchown() system call is particularly useful when used in conjunction with the file locking primitives (see flock(2)). The lchown() system call is similar to chown() but does not follow symbolic links. One of the owner or group id's may be left unchanged by specifying it as -1. RETURN VALUES
Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The chown() and lchown() system calls will fail if: [EACCES] Search permission is denied for a component of the path prefix. [EFAULT] The path argument points outside the process's allocated address space. [ELOOP] Too many symbolic links are encountered in translating the pathname. This is taken to be indicative of a looping symbolic link. [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. [ENOENT] A component of path does not exist. [ENOTDIR] A component of the path prefix is not a directory. The fchown() system call will fail if: [EBADF] The fildes argument does not refer to a valid descriptor. [EINVAL] The fildes argument refers to a socket, not a file. Any of these calls will fail if: [EINTR] Its execution is interrupted by a signal. [EIO] An I/O error occurs while reading from or writing to the file system. [EPERM] The effective user ID does not match the owner of the file and the calling process does not have appropriate (i.e., root) privileges. [EROFS] The named file resides on a read-only file system. SEE ALSO
chgrp(1), chmod(2), flock(2), chown(8) STANDARDS
The chown() system call is expected to conform to ISO/IEC 9945-1:1990 (``POSIX.1''). HISTORY
The chown() function appeared in Version 7 AT&T UNIX. The fchown() system call appeared in 4.2BSD. The chown() and fchown() system calls were changed to follow symbolic links in 4.4BSD. The lchown() system call was added in FreeBSD 3.0 to compensate for the loss of functionality. BSD
April 19, 1994 BSD
All times are GMT -4. The time now is 07:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy