Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I change the Owner/group of a folder in SCO?

I did:

ls -l

and got the following:

...
drwxr-xr-x 9 root root 512 Jul 2 10:09 opt
...

I have tried:

chown /opt

But that hasn't worked.

The user I am wanting to use is: test

I have asked another question (different thread) about how to change the folder permissions, but realized I still won't be able to create folders in the /opt folder with root being the owner and group - if test is not part of the root group.

Gaining root privileges in SCO

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Did you read the manual? I don't have SCO but I presume chown works as in oridnary unix:

SYNOPSIS
       chown [OPTION]... [OWNER][:[GROUP]] FILE...

DESCRIPTION
       [...] If  only a colon is given, or if the entire operand is empty, nei‐
       ther the owner nor the group is changed.

So try

chown test /opt

In case you want to change the group also, use

chown test:testgroup /opt
share|improve this answer
    
I have just tried 'chown test /opt' and got this message below it: "chown: cannot change owner ID of /opt: Operation not permitted (error 1)" –  Kevdog777 Jul 13 '12 at 11:00
    
You need to be root in order to be able to do the operation. Or use asroot (sudo equivalent of SCO) –  Jari Laamanen Jul 13 '12 at 11:04
    
...or tfadmin if you're actually in SCO unixware. –  Jari Laamanen Jul 13 '12 at 11:12
    
Thank you, I had to "log out" as the test user and log in as the root, and have managed to change the owner there, now will try again. –  Kevdog777 Jul 13 '12 at 12:30
add comment

You can change the owner for any folder like this

sudo chown -R username:username Dir name
share|improve this answer
    
This does not just change owner/group of both Dir and name, but also the owner/group of every file and directory under both directories Dir and name (of course assuming both are directories). –  Anthon Oct 21 '13 at 7:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.