Solved

Linux RHEL 5 - Chmod issue

Posted on 2011-09-23
5
472 Views
Last Modified: 2012-05-12
Hi, I am attempting to upload a file into a specific folder using WinSCP..  I need to change a directory to give a specific user upload rights onto the Linux box.

How do I do this from the command line?  Thanks

0
Comment
Question by:NYGiantsFan
5 Comments
 

Author Comment

by:NYGiantsFan
ID: 36587157
When I attempt to change this within WinSCP i get the following error:

Command 'chmod 0770 "tmp"'
failed with return code 1 and error message
chmod: changing permissions of 'tmp': Operation not permitted.
0
 
LVL 30

Accepted Solution

by:
Brad Howe earned 250 total points
ID: 36587219
Hi,

chmod can only be run under ROOT or the use of a sudo'er account.

To only give full permission to user and group, use it as follows:

account # sudo chmod 0770 /folder-path
    -    Enter account password
OR
account # su -
   -     Enter root password
root # chmod 0770 /folder-path

Cheers,
Hades666
0
 
LVL 11

Expert Comment

by:jgiordano
ID: 36587333
are you trying to change the /tmp filesystem permissions? I would advise against that. I would crate a subfolder within /tmp then use that.
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36588297
/tmp should be writable by that user, unless you did something unwise with permissions for /tmp.

Have you tried to upload it to /tmp ?  What does WinSCP say when you do?  You say "tmp" and not "/tmp" so I'm not sure where you are trying to run that chmod.

BTW, chmod 0770 isn't going to help unless the user either owns that directory or is in the group for that directory.

Paste command outputs please.
0
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 250 total points
ID: 36589344
> chmod: changing permissions of 'tmp': Operation not permitted.
You need to be the owner of "tmp" so you can run "chmod" on it.

You can try to create another directory, say "temp" (so you are the owner of "temp". When this directory created successfully, then do
chmod 0770 temp
  to see if you can do it or not.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now