Permissions for softlink

How go I change permissions on a softlink

cd /opt
ls -l
lrwxrwxrwx    1 root     system           24 Mar 29 14:37 apps -> /home/oraapps/opt/apps

Now i do
chown oracle:dba apps

It still shows
rwxrwxrwx    1 root     system           24 Mar 29 14:37 apps -> /home/oraapps/opt/apps

So how do I change the permissions for a softlink
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.

The link is just a shortcut to the file/dir. you may own the file, and someone else may own the symlink. they can delete the symlink, but not the original file. if you make the file read-only to everyone else, they shouldn't be able to make it writeable with a symlink.
You have to change the permission or ownership for apps in /home/oraapps/opt
Joseph GanSystem AdminCommented:
If you use this command under /opt
ls -lL
you would see the real file permision, you can't change the link permision. In fact the permision on the link (apps in this case) is 777, which means everyone has read, write and excute permision. But the actual permision for this link is based on the real file.
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

sgangenamoniAuthor Commented:
Yes I can but I want to see the change at /opt
Joseph GanSystem AdminCommented:
If you want to change the link permision, you can use hard link instead.
yes...u need to use the hard link to see the permission change at /opt

Hard links only work within a filesystem. In other words, don’t use hard links between mounted filesystems. A hard link is only a reference to the original file, not a copy of the file. If the original file is deleted, the information will be lost.

To create a hard link of the file /export/home/fred/stuff to /var/tmp/thing, use:

ln /export/home/fred/stuff /var/tmp/thing

The syntax for creating a hard link of a directory is the same. To create a hard link of /var/www/html to /var/www/webroot, use:

ln /var/www/html /var/www/webroot
What are you trying to achieve?

If you want oracle to own the link, remove the current link and recreate it as the oracle user.
chown -h oracle:dba apps

Will change the owner of the symlink.

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
A soft link has all rights, but the enforcement on whether usera has access to the files/directory to which the soft link points is done by the file system and the settings on the real file/directory.

Using the options other have provided deal with altering the security on the real files.
Changing ownership on the soft link does not alter the underlying file ownership if -H as others have pointed out and would not change whether usera who is now reflected as the owner of the soft link will have access to the real file/directories.
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
Unix OS

From novice to tech pro — start learning today.