Solved

Linux RHEL 5 - Chmod issue

Posted on 2011-09-23
5
498 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Guacamole and browser performance 1 87
add some character at the end of line in vi 7 79
ifconfig 4 46
how to print sub line with  sed /awk /perl in bash file 11 24
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Fine Tune your automatic Updates for Ubuntu / Debian
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

777 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