?
Solved

A permission/Chmod question

Posted on 2006-07-20
9
Medium Priority
?
312 Views
Last Modified: 2010-04-21
I have a html file (foo.html) and a folder (/boo) with many html files. By default, all files I create, uploading via FTP or created in command-line, have permission rw-------. I would like to know if I can set rwx-r--r-- to foo.html and all html files in /boo, and set /boo drwx-r-xr-x. So that I will not need to use FTP or SSH to login evrey time afterI create a new file (because if I do not modify the permission of the file, others cannot view them since their default permissions are all 600.

Thanks
0
Comment
Question by:tiger0516
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 17150888
The default file permissions will depend on your FTP server settings.  Alternatively, you can do a chmod on the file from the FTP client after you have uploaded it.
0
 
LVL 1

Author Comment

by:tiger0516
ID: 17150913
That takes more time. In fact, I am using blogger.com to publish blogs in my department marchine.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 17151061
So you are FTPing the files from blogger.com?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:tiger0516
ID: 17151112
Blogger.com does the FTP job for me. I just need to tell my ftp username and pwd. that's why I do not want to use ftp tool to modify permission manually.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 17151162
OK, so you're initiated the FTP transfer from blogger.com to a FTP server sitting on your network?

If so, what FTP server are you running?
0
 
LVL 1

Author Comment

by:tiger0516
ID: 17151499
I am not sure. I only know server's OS is solaris. I need to ask our department's network admin.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 17151533
If your network admin is the person responsible for your FTP server, then they will be the person who can change the configuration to change the umask of your FTP user.
0
 
LVL 1

Author Comment

by:tiger0516
ID: 17162415
This is the .login file. I added setenv UMASK 077, but it does not work.

# login (July 13, 1999)

# Solaris desktop doesn't want to source these. (see .dtprofile)
# As well, we only want .login if there is a user attached
#   to the terminal. ($prompt will be set)
if (! $?DT && $?prompt) then
  if (! ${?CS_TRACE}) setenv CS_TRACE 0
  if (${CS_TRACE} > 0) then
    cs_echo '<- .login'
    setenv CS_TRACE $CS_TRACE
  endif
  # This ensures your DISPLAY is set. (Remote logins)
  eval `setdisplay -eval`

  # If you add anything, add it here.

##I added this line, but it does not work

setenv UMASK 077

  # Add packages here.
  #enable -fq jdk          #Java support

  # This is how we get tcsh instead of csh
  if (-x /cs/local/bin/tcsh) then
    set tmp=/cs/local/bin/tcsh
  else
    set tmp=`which tcsh`
  endif
  # Only switch to tcsh if it exists somewhere in the path.
  if (-x "$tmp" && $SHELL !~ *tcsh) then
    if (${CS_TRACE} > 0) then
      cs_echo '  <- tcsh'
      @ CS_TRACE++
      setenv CS_TRACE $CS_TRACE
    endif
    setenv SHELL $tmp
    exec $tmp
  endif

  if (${CS_TRACE} > 0) then
    cs_echo '.login ->'
  endif
endif
0
 
LVL 48

Accepted Solution

by:
Tintin earned 300 total points
ID: 17164241
umask is a command and not an environment variable.

You'd need to do:

umask 077

However, depending on what FTP server is running and how it is setup, it may not use your system user and its associated profile.  Again, this is something your network administrator should be able to help you with and if not, then they can't be very good at their job.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

764 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