2

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

Kevdog777
  • 3,194
  • 18
  • 43
  • 64

2 Answers2

2

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
Jari Laamanen
  • 2,371
  • 16
  • 13
-1

You can change the owner for any folder like this

sudo chown -R username:username Dir name
Anthon
  • 78,313
  • 42
  • 165
  • 222
LHH
  • 101
  • 1
  • 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 07:14