Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux RHEL 5 - Chmod issue

Posted on 2011-09-23
5
Medium Priority
?
556 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 1000 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 1000 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

Lessons on Wi-Fi & Recommendations on KRACK

Simplicity and security can be a difficult  balance for any business to tackle. Join us on December 6th for a look at your company's biggest security gap. We will also address the most recent attack, "KRACK" and provide recommendations on how to secure your Wi-Fi network today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

916 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